| 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/themes/theme_service.h" | 5 #include "chrome/browser/themes/theme_service.h" |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 EXPECT_TRUE(registry_->GetExtensionById(extension1_id, | 236 EXPECT_TRUE(registry_->GetExtensionById(extension1_id, |
| 237 ExtensionRegistry::DISABLED)); | 237 ExtensionRegistry::DISABLED)); |
| 238 } | 238 } |
| 239 | 239 |
| 240 #if defined(ENABLE_MANAGED_USERS) | 240 #if defined(ENABLE_MANAGED_USERS) |
| 241 class ThemeServiceSupervisedUserTest : public ThemeServiceTest { | 241 class ThemeServiceSupervisedUserTest : public ThemeServiceTest { |
| 242 public: | 242 public: |
| 243 ThemeServiceSupervisedUserTest() {} | 243 ThemeServiceSupervisedUserTest() {} |
| 244 virtual ~ThemeServiceSupervisedUserTest() {} | 244 virtual ~ThemeServiceSupervisedUserTest() {} |
| 245 | 245 |
| 246 virtual void SetUp() OVERRIDE { | 246 virtual void SetUp() override { |
| 247 is_supervised_ = true; | 247 is_supervised_ = true; |
| 248 ThemeServiceTest::SetUp(); | 248 ThemeServiceTest::SetUp(); |
| 249 } | 249 } |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 // Checks that supervised users have their own default theme. | 252 // Checks that supervised users have their own default theme. |
| 253 TEST_F(ThemeServiceSupervisedUserTest, | 253 TEST_F(ThemeServiceSupervisedUserTest, |
| 254 SupervisedUserThemeReplacesDefaultTheme) { | 254 SupervisedUserThemeReplacesDefaultTheme) { |
| 255 ThemeService* theme_service = | 255 ThemeService* theme_service = |
| 256 ThemeServiceFactory::GetForProfile(profile_.get()); | 256 ThemeServiceFactory::GetForProfile(profile_.get()); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 271 theme_service->UseDefaultTheme(); | 271 theme_service->UseDefaultTheme(); |
| 272 EXPECT_TRUE(theme_service->UsingDefaultTheme()); | 272 EXPECT_TRUE(theme_service->UsingDefaultTheme()); |
| 273 EXPECT_TRUE(get_theme_supplier(theme_service)); | 273 EXPECT_TRUE(get_theme_supplier(theme_service)); |
| 274 EXPECT_EQ(get_theme_supplier(theme_service)->get_theme_type(), | 274 EXPECT_EQ(get_theme_supplier(theme_service)->get_theme_type(), |
| 275 CustomThemeSupplier::SUPERVISED_USER_THEME); | 275 CustomThemeSupplier::SUPERVISED_USER_THEME); |
| 276 } | 276 } |
| 277 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) | 277 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 278 #endif // defined(ENABLE_MANAGED_USERS) | 278 #endif // defined(ENABLE_MANAGED_USERS) |
| 279 | 279 |
| 280 }; // namespace theme_service_internal | 280 }; // namespace theme_service_internal |
| OLD | NEW |