OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/policy/consumer_management_notifier_factory.h" | 5 #include "chrome/browser/chromeos/policy/consumer_management_notifier_factory.h" |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/browser_process_platform_part.h" | 8 #include "chrome/browser/browser_process_platform_part.h" |
9 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" | 9 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" |
10 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 10 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
11 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 11 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
12 #include "chrome/browser/chromeos/policy/consumer_management_notifier.h" | |
13 #include "chrome/browser/chromeos/policy/consumer_management_service.h" | 12 #include "chrome/browser/chromeos/policy/consumer_management_service.h" |
14 #include "chrome/browser/chromeos/policy/fake_consumer_management_service.h" | 13 #include "chrome/browser/chromeos/policy/fake_consumer_management_service.h" |
15 #include "chrome/test/base/testing_browser_process.h" | 14 #include "chrome/test/base/testing_browser_process.h" |
16 #include "chrome/test/base/testing_profile_manager.h" | 15 #include "chrome/test/base/testing_profile_manager.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 | 17 |
19 namespace { | 18 namespace { |
20 const char* kTestOwner = "test.owner@chromium.org.test"; | 19 const char* kTestOwner = "test.owner@chromium.org.test"; |
21 const char* kTestUser = "test.user@chromium.org.test"; | 20 const char* kTestUser = "test.user@chromium.org.test"; |
22 } | 21 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 64 } |
66 | 65 |
67 TEST_F(ConsumerManagementNotifierFactoryTest, | 66 TEST_F(ConsumerManagementNotifierFactoryTest, |
68 ServiceIsNotCreatedForNonOwner) { | 67 ServiceIsNotCreatedForNonOwner) { |
69 Profile* profile = testing_profile_manager_->CreateTestingProfile(kTestUser); | 68 Profile* profile = testing_profile_manager_->CreateTestingProfile(kTestUser); |
70 EXPECT_FALSE( | 69 EXPECT_FALSE( |
71 ConsumerManagementNotifierFactory::GetForBrowserContext(profile)); | 70 ConsumerManagementNotifierFactory::GetForBrowserContext(profile)); |
72 } | 71 } |
73 | 72 |
74 } // namespace policy | 73 } // namespace policy |
OLD | NEW |