| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <memory> | 5 #include <memory> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/chromeos/arc/policy/arc_policy_bridge.h" | 12 #include "chrome/browser/chromeos/arc/policy/arc_policy_bridge.h" |
| 13 #include "components/arc/arc_bridge_service.h" | 13 #include "components/arc/arc_bridge_service.h" |
| 14 #include "components/arc/test/fake_policy_instance.h" | 14 #include "components/arc/test/fake_policy_instance.h" |
| 15 #include "components/policy/core/common/mock_policy_service.h" | 15 #include "components/policy/core/common/mock_policy_service.h" |
| 16 #include "components/policy/core/common/policy_map.h" | 16 #include "components/policy/core/common/policy_map.h" |
| 17 #include "components/policy/core/common/policy_namespace.h" | 17 #include "components/policy/core/common/policy_namespace.h" |
| 18 #include "components/policy/core/common/policy_types.h" | 18 #include "components/policy/core/common/policy_types.h" |
| 19 #include "components/policy/policy_constants.h" | 19 #include "components/policy/policy_constants.h" |
| 20 #include "mojo/public/cpp/bindings/string.h" | |
| 21 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 23 | 22 |
| 24 namespace { | 23 namespace { |
| 25 | 24 |
| 26 constexpr char kFakeONC[] = | 25 constexpr char kFakeONC[] = |
| 27 "{\"NetworkConfigurations\":[" | 26 "{\"NetworkConfigurations\":[" |
| 28 "{\"GUID\":\"{485d6076-dd44-6b6d-69787465725f5040}\"," | 27 "{\"GUID\":\"{485d6076-dd44-6b6d-69787465725f5040}\"," |
| 29 "\"Type\":\"WiFi\"," | 28 "\"Type\":\"WiFi\"," |
| 30 "\"Name\":\"My WiFi Network\"," | 29 "\"Name\":\"My WiFi Network\"," |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 TEST_F(ArcPolicyBridgeTest, PolicyInstanceUnmanagedTest) { | 368 TEST_F(ArcPolicyBridgeTest, PolicyInstanceUnmanagedTest) { |
| 370 policy_bridge()->OverrideIsManagedForTesting(false); | 369 policy_bridge()->OverrideIsManagedForTesting(false); |
| 371 policy_instance()->CallGetPolicies(PolicyStringCallback("")); | 370 policy_instance()->CallGetPolicies(PolicyStringCallback("")); |
| 372 } | 371 } |
| 373 | 372 |
| 374 TEST_F(ArcPolicyBridgeTest, PolicyInstanceManagedTest) { | 373 TEST_F(ArcPolicyBridgeTest, PolicyInstanceManagedTest) { |
| 375 policy_instance()->CallGetPolicies(PolicyStringCallback("{}")); | 374 policy_instance()->CallGetPolicies(PolicyStringCallback("{}")); |
| 376 } | 375 } |
| 377 | 376 |
| 378 } // namespace arc | 377 } // namespace arc |
| OLD | NEW |