[M85 Dev][EFL] Fix crashes at webview launch
[platform/framework/web/chromium-efl.git] / base / enterprise_util_mac_unittest.mm
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