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

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

Issue 282103003: Moved IS_EPHEMERAL flag to extension prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up file header Created 6 years, 7 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 "chrome/browser/extensions/extension_service_unittest.h" 5 #include "chrome/browser/extensions/extension_service_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 6847 matching lines...) Expand 10 before | Expand all | Expand 10 after
6858 extensions::ExtensionNotificationObserver notifications( 6858 extensions::ExtensionNotificationObserver notifications(
6859 content::NotificationService::AllSources(), id_set); 6859 content::NotificationService::AllSources(), id_set);
6860 6860
6861 // Installation should be allowed but the extension should never have been 6861 // Installation should be allowed but the extension should never have been
6862 // loaded and it should be blacklisted in prefs. 6862 // loaded and it should be blacklisted in prefs.
6863 service_->OnExtensionInstalled( 6863 service_->OnExtensionInstalled(
6864 extension.get(), 6864 extension.get(),
6865 syncer::StringOrdinal(), 6865 syncer::StringOrdinal(),
6866 false /* has requirement errors */, 6866 false /* has requirement errors */,
6867 extensions::BLACKLISTED_MALWARE, 6867 extensions::BLACKLISTED_MALWARE,
6868 false /* is ephemeral */,
6868 false /* wait for idle */); 6869 false /* wait for idle */);
6869 base::RunLoop().RunUntilIdle(); 6870 base::RunLoop().RunUntilIdle();
6870 6871
6871 // Extension was installed but not loaded. 6872 // Extension was installed but not loaded.
6872 EXPECT_TRUE(notifications.CheckNotifications( 6873 EXPECT_TRUE(notifications.CheckNotifications(
6873 chrome::NOTIFICATION_EXTENSION_INSTALLED)); 6874 chrome::NOTIFICATION_EXTENSION_INSTALLED));
6874 EXPECT_TRUE(service_->GetInstalledExtension(id)); 6875 EXPECT_TRUE(service_->GetInstalledExtension(id));
6875 6876
6876 EXPECT_FALSE(registry_->enabled_extensions().Contains(id)); 6877 EXPECT_FALSE(registry_->enabled_extensions().Contains(id));
6877 EXPECT_TRUE(registry_->blacklisted_extensions().Contains(id)); 6878 EXPECT_TRUE(registry_->blacklisted_extensions().Contains(id));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
6936 // ReconcileKnownDisabled(). 6937 // ReconcileKnownDisabled().
6937 service_->EnableExtension(good2); 6938 service_->EnableExtension(good2);
6938 service_->ReconcileKnownDisabled(); 6939 service_->ReconcileKnownDisabled();
6939 expected_extensions.insert(good2); 6940 expected_extensions.insert(good2);
6940 expected_disabled_extensions.erase(good2); 6941 expected_disabled_extensions.erase(good2);
6941 6942
6942 EXPECT_EQ(expected_extensions, registry_->enabled_extensions().GetIDs()); 6943 EXPECT_EQ(expected_extensions, registry_->enabled_extensions().GetIDs());
6943 EXPECT_EQ(expected_disabled_extensions, 6944 EXPECT_EQ(expected_disabled_extensions,
6944 registry_->disabled_extensions().GetIDs()); 6945 registry_->disabled_extensions().GetIDs());
6945 } 6946 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_storage_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698