| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <map> | 6 #include <map> |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 }; | 431 }; |
| 432 | 432 |
| 433 class ExtensionServiceTest | 433 class ExtensionServiceTest |
| 434 : public extensions::ExtensionServiceTestWithInstall { | 434 : public extensions::ExtensionServiceTestWithInstall { |
| 435 public: | 435 public: |
| 436 ExtensionServiceTest() { | 436 ExtensionServiceTest() { |
| 437 // The extension subsystem posts logging tasks to be done after | 437 // The extension subsystem posts logging tasks to be done after |
| 438 // browser startup. There's no StartupObserver as there normally | 438 // browser startup. There's no StartupObserver as there normally |
| 439 // would be since we're in a unit test, so we have to explicitly | 439 // would be since we're in a unit test, so we have to explicitly |
| 440 // note tasks should be processed. | 440 // note tasks should be processed. |
| 441 AfterStartupTaskUtils::SetBrowserStartupIsComplete(); | 441 AfterStartupTaskUtils::SetBrowserStartupIsCompleteForTesting(); |
| 442 } | 442 } |
| 443 | 443 |
| 444 void AddMockExternalProvider( | 444 void AddMockExternalProvider( |
| 445 extensions::ExternalProviderInterface* provider) { | 445 extensions::ExternalProviderInterface* provider) { |
| 446 service()->AddProviderForTesting(provider); | 446 service()->AddProviderForTesting(provider); |
| 447 } | 447 } |
| 448 | 448 |
| 449 protected: | 449 protected: |
| 450 // Paths to some of the fake extensions. | 450 // Paths to some of the fake extensions. |
| 451 base::FilePath good1_path() { | 451 base::FilePath good1_path() { |
| (...skipping 5718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6170 | 6170 |
| 6171 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, | 6171 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, |
| 6172 content::Source<Profile>(profile()), | 6172 content::Source<Profile>(profile()), |
| 6173 content::NotificationService::NoDetails()); | 6173 content::NotificationService::NoDetails()); |
| 6174 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); | 6174 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); |
| 6175 EXPECT_EQ(0u, registry()->enabled_extensions().size()); | 6175 EXPECT_EQ(0u, registry()->enabled_extensions().size()); |
| 6176 EXPECT_EQ(0u, registry()->disabled_extensions().size()); | 6176 EXPECT_EQ(0u, registry()->disabled_extensions().size()); |
| 6177 EXPECT_EQ(0u, registry()->terminated_extensions().size()); | 6177 EXPECT_EQ(0u, registry()->terminated_extensions().size()); |
| 6178 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); | 6178 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); |
| 6179 } | 6179 } |
| OLD | NEW |