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

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: 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 6821 matching lines...) Expand 10 before | Expand all | Expand 10 after
6832 extensions::ExtensionNotificationObserver notifications( 6832 extensions::ExtensionNotificationObserver notifications(
6833 content::NotificationService::AllSources(), id_set); 6833 content::NotificationService::AllSources(), id_set);
6834 6834
6835 // Installation should be allowed but the extension should never have been 6835 // Installation should be allowed but the extension should never have been
6836 // loaded and it should be blacklisted in prefs. 6836 // loaded and it should be blacklisted in prefs.
6837 service_->OnExtensionInstalled( 6837 service_->OnExtensionInstalled(
6838 extension.get(), 6838 extension.get(),
6839 syncer::StringOrdinal(), 6839 syncer::StringOrdinal(),
6840 false /* has requirement errors */, 6840 false /* has requirement errors */,
6841 extensions::BLACKLISTED_MALWARE, 6841 extensions::BLACKLISTED_MALWARE,
6842 false /* is ephemeral */,
6842 false /* wait for idle */); 6843 false /* wait for idle */);
6843 base::RunLoop().RunUntilIdle(); 6844 base::RunLoop().RunUntilIdle();
6844 6845
6845 // Extension was installed but not loaded. 6846 // Extension was installed but not loaded.
6846 EXPECT_TRUE(notifications.CheckNotifications( 6847 EXPECT_TRUE(notifications.CheckNotifications(
6847 chrome::NOTIFICATION_EXTENSION_INSTALLED)); 6848 chrome::NOTIFICATION_EXTENSION_INSTALLED));
6848 EXPECT_TRUE(service_->GetInstalledExtension(id)); 6849 EXPECT_TRUE(service_->GetInstalledExtension(id));
6849 6850
6850 EXPECT_FALSE(registry_->enabled_extensions().Contains(id)); 6851 EXPECT_FALSE(registry_->enabled_extensions().Contains(id));
6851 EXPECT_TRUE(registry_->blacklisted_extensions().Contains(id)); 6852 EXPECT_TRUE(registry_->blacklisted_extensions().Contains(id));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
6910 // ReconcileKnownDisabled(). 6911 // ReconcileKnownDisabled().
6911 service_->EnableExtension(good2); 6912 service_->EnableExtension(good2);
6912 service_->ReconcileKnownDisabled(); 6913 service_->ReconcileKnownDisabled();
6913 expected_extensions.insert(good2); 6914 expected_extensions.insert(good2);
6914 expected_disabled_extensions.erase(good2); 6915 expected_disabled_extensions.erase(good2);
6915 6916
6916 EXPECT_EQ(expected_extensions, registry_->enabled_extensions().GetIDs()); 6917 EXPECT_EQ(expected_extensions, registry_->enabled_extensions().GetIDs());
6917 EXPECT_EQ(expected_disabled_extensions, 6918 EXPECT_EQ(expected_disabled_extensions,
6918 registry_->disabled_extensions().GetIDs()); 6919 registry_->disabled_extensions().GetIDs());
6919 } 6920 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698