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

Unified Diff: chrome/renderer/content_settings_observer_browsertest.cc

Issue 78303005: ContentSettings API should not interact with <webview> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits + Added missing file Created 7 years, 1 month 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
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 90832815160c1cef2cb52ac657b8fdc91facb116..5cfcb09829cde7a6a4c9af051bb1c9d59c6484dd 100644
--- a/chrome/renderer/content_settings_observer_browsertest.cc
+++ b/chrome/renderer/content_settings_observer_browsertest.cc
@@ -116,7 +116,7 @@ TEST_F(ChromeRenderViewTest, JSBlockSentAfterPageLoad) {
std::string(),
false));
ContentSettingsObserver* observer = ContentSettingsObserver::Get(view_);
- observer->SetContentSettingRules(&content_setting_rules);
+ observer->OnSetContentSettingRules(content_setting_rules);
// Make sure no pending messages are in the queue.
ProcessPendingMessages();
@@ -196,7 +196,7 @@ TEST_F(ChromeRenderViewTest, ImagesBlockedByDefault) {
false));
ContentSettingsObserver* observer = ContentSettingsObserver::Get(view_);
- observer->SetContentSettingRules(&content_setting_rules);
+ observer->OnSetContentSettingRules(content_setting_rules);
EXPECT_CALL(mock_observer,
OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
EXPECT_FALSE(observer->AllowImage(GetMainFrame(),
@@ -212,6 +212,7 @@ TEST_F(ChromeRenderViewTest, ImagesBlockedByDefault) {
CONTENT_SETTING_ALLOW,
std::string(),
false));
+ observer->OnSetContentSettingRules(content_setting_rules);
EXPECT_CALL(
mock_observer,
@@ -239,7 +240,7 @@ TEST_F(ChromeRenderViewTest, ImagesAllowedByDefault) {
false));
ContentSettingsObserver* observer = ContentSettingsObserver::Get(view_);
- observer->SetContentSettingRules(&content_setting_rules);
+ observer->OnSetContentSettingRules(content_setting_rules);
EXPECT_CALL(
mock_observer,
OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES, std::string())).Times(0);
@@ -256,6 +257,7 @@ TEST_F(ChromeRenderViewTest, ImagesAllowedByDefault) {
CONTENT_SETTING_BLOCK,
std::string(),
false));
+ observer->OnSetContentSettingRules(content_setting_rules);
EXPECT_CALL(mock_observer,
OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
EXPECT_FALSE(observer->AllowImage(GetMainFrame(),
@@ -276,7 +278,7 @@ TEST_F(ChromeRenderViewTest, ContentSettingsBlockScripts) {
false));
ContentSettingsObserver* observer = ContentSettingsObserver::Get(view_);
- observer->SetContentSettingRules(&content_setting_rules);
+ observer->OnSetContentSettingRules(content_setting_rules);
// Load a page which contains a script.
std::string html = "<html>"
@@ -311,7 +313,7 @@ TEST_F(ChromeRenderViewTest, ContentSettingsAllowScripts) {
false));
ContentSettingsObserver* observer = ContentSettingsObserver::Get(view_);
- observer->SetContentSettingRules(&content_setting_rules);
+ observer->OnSetContentSettingRules(content_setting_rules);
// Load a page which contains a script.
std::string html = "<html>"
@@ -356,7 +358,7 @@ TEST_F(ChromeRenderViewTest, ContentSettingsInterstitialPages) {
false));
ContentSettingsObserver* observer = ContentSettingsObserver::Get(view_);
- observer->SetContentSettingRules(&content_setting_rules);
+ observer->OnSetContentSettingRules(content_setting_rules);
observer->OnSetAsInterstitial();
// Load a page which contains a script.

Powered by Google App Engine
This is Rietveld 408576698