| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/extensions/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 5273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5284 // enabled or not. | 5284 // enabled or not. |
| 5285 class ExtensionServiceTestSimple : public testing::Test { | 5285 class ExtensionServiceTestSimple : public testing::Test { |
| 5286 content::TestBrowserThreadBundle thread_bundle_; | 5286 content::TestBrowserThreadBundle thread_bundle_; |
| 5287 }; | 5287 }; |
| 5288 | 5288 |
| 5289 TEST_F(ExtensionServiceTestSimple, Enabledness) { | 5289 TEST_F(ExtensionServiceTestSimple, Enabledness) { |
| 5290 // Make sure the PluginService singleton is destroyed at the end of the test. | 5290 // Make sure the PluginService singleton is destroyed at the end of the test. |
| 5291 base::ShadowingAtExitManager at_exit_manager; | 5291 base::ShadowingAtExitManager at_exit_manager; |
| 5292 #if defined(ENABLE_PLUGINS) | 5292 #if defined(ENABLE_PLUGINS) |
| 5293 content::PluginService::GetInstance()->Init(); | 5293 content::PluginService::GetInstance()->Init(); |
| 5294 content::PluginService::GetInstance()->DisablePluginsDiscoveryForTesting(); | |
| 5295 #endif | 5294 #endif |
| 5296 | 5295 |
| 5297 ExtensionErrorReporter::Init(false); // no noisy errors | 5296 ExtensionErrorReporter::Init(false); // no noisy errors |
| 5298 ExtensionsReadyRecorder recorder; | 5297 ExtensionsReadyRecorder recorder; |
| 5299 scoped_ptr<TestingProfile> profile(new TestingProfile()); | 5298 scoped_ptr<TestingProfile> profile(new TestingProfile()); |
| 5300 #if defined OS_CHROMEOS | 5299 #if defined OS_CHROMEOS |
| 5301 chromeos::ScopedTestDeviceSettingsService device_settings_service; | 5300 chromeos::ScopedTestDeviceSettingsService device_settings_service; |
| 5302 chromeos::ScopedTestCrosSettings cros_settings; | 5301 chromeos::ScopedTestCrosSettings cros_settings; |
| 5303 scoped_ptr<chromeos::ScopedTestUserManager> user_manager( | 5302 scoped_ptr<chromeos::ScopedTestUserManager> user_manager( |
| 5304 new chromeos::ScopedTestUserManager); | 5303 new chromeos::ScopedTestUserManager); |
| (...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6521 | 6520 |
| 6522 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, | 6521 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, |
| 6523 content::Source<Profile>(profile()), | 6522 content::Source<Profile>(profile()), |
| 6524 content::NotificationService::NoDetails()); | 6523 content::NotificationService::NoDetails()); |
| 6525 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); | 6524 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); |
| 6526 EXPECT_EQ(0u, registry()->enabled_extensions().size()); | 6525 EXPECT_EQ(0u, registry()->enabled_extensions().size()); |
| 6527 EXPECT_EQ(0u, registry()->disabled_extensions().size()); | 6526 EXPECT_EQ(0u, registry()->disabled_extensions().size()); |
| 6528 EXPECT_EQ(0u, registry()->terminated_extensions().size()); | 6527 EXPECT_EQ(0u, registry()->terminated_extensions().size()); |
| 6529 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); | 6528 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); |
| 6530 } | 6529 } |
| OLD | NEW |