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