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

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

Issue 515563003: Remove dependency of chrome in WebRequestPermissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move KWebStoreAppId to extensions. Created 6 years, 3 months 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 <set> 6 #include <set>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 2438
2439 // Ensures that the CWS has properly initialized ordinals. 2439 // Ensures that the CWS has properly initialized ordinals.
2440 TEST_F(ExtensionServiceTest, EnsureCWSOrdinalsInitialized) { 2440 TEST_F(ExtensionServiceTest, EnsureCWSOrdinalsInitialized) {
2441 InitializeEmptyExtensionService(); 2441 InitializeEmptyExtensionService();
2442 service()->component_loader()->Add( 2442 service()->component_loader()->Add(
2443 IDR_WEBSTORE_MANIFEST, base::FilePath(FILE_PATH_LITERAL("web_store"))); 2443 IDR_WEBSTORE_MANIFEST, base::FilePath(FILE_PATH_LITERAL("web_store")));
2444 service()->Init(); 2444 service()->Init();
2445 2445
2446 AppSorting* sorting = ExtensionPrefs::Get(profile())->app_sorting(); 2446 AppSorting* sorting = ExtensionPrefs::Get(profile())->app_sorting();
2447 EXPECT_TRUE( 2447 EXPECT_TRUE(
2448 sorting->GetPageOrdinal(extension_misc::kWebStoreAppId).IsValid()); 2448 sorting->GetPageOrdinal(extensions::kWebStoreAppId).IsValid());
2449 EXPECT_TRUE( 2449 EXPECT_TRUE(
2450 sorting->GetAppLaunchOrdinal(extension_misc::kWebStoreAppId).IsValid()); 2450 sorting->GetAppLaunchOrdinal(extensions::kWebStoreAppId).IsValid());
2451 } 2451 }
2452 2452
2453 TEST_F(ExtensionServiceTest, InstallAppsWithUnlimitedStorage) { 2453 TEST_F(ExtensionServiceTest, InstallAppsWithUnlimitedStorage) {
2454 InitializeEmptyExtensionService(); 2454 InitializeEmptyExtensionService();
2455 EXPECT_TRUE(registry()->enabled_extensions().is_empty()); 2455 EXPECT_TRUE(registry()->enabled_extensions().is_empty());
2456 2456
2457 int pref_count = 0; 2457 int pref_count = 0;
2458 2458
2459 // Install app1 with unlimited storage. 2459 // Install app1 with unlimited storage.
2460 const Extension* extension = 2460 const Extension* extension =
(...skipping 4692 matching lines...) Expand 10 before | Expand all | Expand 10 after
7153 7153
7154 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, 7154 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED,
7155 content::Source<Profile>(profile()), 7155 content::Source<Profile>(profile()),
7156 content::NotificationService::NoDetails()); 7156 content::NotificationService::NoDetails());
7157 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); 7157 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_);
7158 EXPECT_EQ(0u, registry()->enabled_extensions().size()); 7158 EXPECT_EQ(0u, registry()->enabled_extensions().size());
7159 EXPECT_EQ(0u, registry()->disabled_extensions().size()); 7159 EXPECT_EQ(0u, registry()->disabled_extensions().size());
7160 EXPECT_EQ(0u, registry()->terminated_extensions().size()); 7160 EXPECT_EQ(0u, registry()->terminated_extensions().size());
7161 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); 7161 EXPECT_EQ(0u, registry()->blacklisted_extensions().size());
7162 } 7162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698