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

Unified Diff: chrome/renderer/content_settings_observer_browsertest.cc

Issue 8356010: Merge 106270 - Check for default content settings when requiring user authorization for plug-ins. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src
Patch Set: fix Created 9 years, 2 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/renderer/content_settings_observer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/content_settings_observer_browsertest.cc
diff --git a/chrome/renderer/content_settings_observer_browsertest.cc b/chrome/renderer/content_settings_observer_browsertest.cc
index bc11b17609a2235d5379ece7d565984112020c19..ceaaee1f19868bd091fef9fe82e06c1550a3fb47 100644
--- a/chrome/renderer/content_settings_observer_browsertest.cc
+++ b/chrome/renderer/content_settings_observer_browsertest.cc
@@ -148,21 +148,17 @@ TEST_F(ChromeRenderViewTest, PluginsTemporarilyAllowed) {
ContentSettingsObserver* observer = ContentSettingsObserver::Get(view_);
observer->SetContentSettings(settings);
ContentSettingsObserver::SetDefaultContentSettings(settings);
- EXPECT_EQ(CONTENT_SETTING_BLOCK,
- observer->GetContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS));
+ EXPECT_FALSE(observer->plugins_temporarily_allowed());
// Temporarily allow plugins.
OnMessageReceived(ChromeViewMsg_LoadBlockedPlugins(MSG_ROUTING_NONE));
- EXPECT_EQ(CONTENT_SETTING_ALLOW,
- observer->GetContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS));
+ EXPECT_TRUE(observer->plugins_temporarily_allowed());
// Simulate a navigation within the page.
DidNavigateWithinPage(GetMainFrame(), true);
- EXPECT_EQ(CONTENT_SETTING_ALLOW,
- observer->GetContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS));
+ EXPECT_TRUE(observer->plugins_temporarily_allowed());
// Navigate to a different page.
LoadHTML("<html>Bar</html>");
- EXPECT_EQ(CONTENT_SETTING_BLOCK,
- observer->GetContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS));
+ EXPECT_FALSE(observer->plugins_temporarily_allowed());
}
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698