Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 1456703003: AfterStartupTask: Use ForTesting() method rather than friends. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/after_startup_task_utils_unittest.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698