OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/policy/policy_service_impl.h" | 5 #include "chrome/browser/policy/policy_service_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 12 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "content/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 using ::testing::AnyNumber; | 18 using ::testing::AnyNumber; |
19 using ::testing::Mock; | 19 using ::testing::Mock; |
20 using ::testing::Return; | 20 using ::testing::Return; |
21 using ::testing::_; | 21 using ::testing::_; |
22 | 22 |
23 namespace policy { | 23 namespace policy { |
24 | 24 |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 // level/scope combination takes precedence, on every namespace. | 468 // level/scope combination takes precedence, on every namespace. |
469 expected.Set(kDiffLevelPolicy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 469 expected.Set(kDiffLevelPolicy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
470 base::Value::CreateStringValue("bundle2")); | 470 base::Value::CreateStringValue("bundle2")); |
471 EXPECT_TRUE(policy_service_->GetPolicies(POLICY_DOMAIN_CHROME, "") | 471 EXPECT_TRUE(policy_service_->GetPolicies(POLICY_DOMAIN_CHROME, "") |
472 .Equals(expected)); | 472 .Equals(expected)); |
473 EXPECT_TRUE(policy_service_->GetPolicies(POLICY_DOMAIN_EXTENSIONS, kExtension) | 473 EXPECT_TRUE(policy_service_->GetPolicies(POLICY_DOMAIN_EXTENSIONS, kExtension) |
474 .Equals(expected)); | 474 .Equals(expected)); |
475 } | 475 } |
476 | 476 |
477 } // namespace policy | 477 } // namespace policy |
OLD | NEW |