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

Unified Diff: chrome/browser/host_content_settings_map_unittest.cc

Issue 3068005: Flesh out the content settings exceptions lists a bit more. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: reduce instance vars Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/host_content_settings_map.cc ('k') | chrome/browser/resources/options.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/host_content_settings_map_unittest.cc
diff --git a/chrome/browser/host_content_settings_map_unittest.cc b/chrome/browser/host_content_settings_map_unittest.cc
index 108d26e7aeb53cb51d6013b82a3c19993ec809d5..87826a044557101f8590ef88b727b3737ac4cdf6 100644
--- a/chrome/browser/host_content_settings_map_unittest.cc
+++ b/chrome/browser/host_content_settings_map_unittest.cc
@@ -42,6 +42,7 @@ class StubSettingsObserver : public NotificationObserver {
last_notifier = content_settings.ptr();
last_pattern = settings_details.ptr()->pattern();
last_update_all = settings_details.ptr()->update_all();
+ last_update_all_types = settings_details.ptr()->update_all_types();
// This checks that calling a Get function from an observer doesn't
// deadlock.
last_notifier->GetContentSettings(GURL("http://random-hostname.com/"));
@@ -50,6 +51,7 @@ class StubSettingsObserver : public NotificationObserver {
HostContentSettingsMap* last_notifier;
HostContentSettingsMap::Pattern last_pattern;
bool last_update_all;
+ bool last_update_all_types;
int counter;
private:
@@ -250,23 +252,27 @@ TEST_F(HostContentSettingsMapTest, Observer) {
EXPECT_EQ(host_content_settings_map, observer.last_notifier);
EXPECT_EQ(pattern, observer.last_pattern);
EXPECT_FALSE(observer.last_update_all);
+ EXPECT_FALSE(observer.last_update_all_types);
EXPECT_EQ(1, observer.counter);
host_content_settings_map->ClearSettingsForOneType(
CONTENT_SETTINGS_TYPE_IMAGES);
EXPECT_EQ(host_content_settings_map, observer.last_notifier);
EXPECT_TRUE(observer.last_update_all);
+ EXPECT_FALSE(observer.last_update_all_types);
EXPECT_EQ(2, observer.counter);
host_content_settings_map->ResetToDefaults();
EXPECT_EQ(host_content_settings_map, observer.last_notifier);
EXPECT_TRUE(observer.last_update_all);
+ EXPECT_TRUE(observer.last_update_all_types);
EXPECT_EQ(3, observer.counter);
host_content_settings_map->SetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_IMAGES, CONTENT_SETTING_BLOCK);
EXPECT_EQ(host_content_settings_map, observer.last_notifier);
EXPECT_TRUE(observer.last_update_all);
+ EXPECT_FALSE(observer.last_update_all_types);
EXPECT_EQ(4, observer.counter);
}
« no previous file with comments | « chrome/browser/host_content_settings_map.cc ('k') | chrome/browser/resources/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698