blob: cfa205fcdf53a6aa5b1e92062ccad8b46c0afde8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/enterprise_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
TEST(EnterpriseUtilMacTest, IsDeviceRegisteredWithManagementOldSmokeTest) {
MacDeviceManagementStateOld state = IsDeviceRegisteredWithManagementOld();
EXPECT_NE(MacDeviceManagementStateOld::kFailureAPIUnavailable, state);
EXPECT_NE(MacDeviceManagementStateOld::kFailureUnableToParseResult, state);
}
TEST(EnterpriseUtilMacTest, IsDeviceRegisteredWithManagementNewSmokeTest) {
MacDeviceManagementStateNew state = IsDeviceRegisteredWithManagementNew();
if (@available(macOS 10.13.4, *)) {
EXPECT_NE(MacDeviceManagementStateNew::kFailureAPIUnavailable, state);
EXPECT_NE(MacDeviceManagementStateNew::kFailureUnableToParseResult, state);
} else {
EXPECT_EQ(MacDeviceManagementStateNew::kFailureAPIUnavailable, state);
}
}
} // namespace base
|