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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc

Issue 1392993002: Strictly block blockable mixed subresources in subframes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/mixedContent/active-subresource-in-iframe-blocked.https.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc
index a5c3e1f3d6932ff14f07d225342e27a3ea8bf0e2..ea1fa8ded2b57d0123714340b71dfa739da271b3 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc
@@ -74,28 +74,18 @@ IN_PROC_BROWSER_TEST_F(ContentSettingBubbleModelMixedScriptTest, MainFrame) {
CONTENT_SETTINGS_TYPE_MIXEDSCRIPT));
}
-// Tests that a MIXEDSCRIPT type ContentSettingBubbleModel works for an iframe.
+// Tests that a MIXEDSCRIPT type ContentSettingBubbleModel does not work
+// for an iframe (mixed script in iframes is never allowed and the mixed
+// content shield isn't shown for it).
IN_PROC_BROWSER_TEST_F(ContentSettingBubbleModelMixedScriptTest, Iframe) {
GURL url(https_server_->GetURL(
"files/content_setting_bubble/mixed_script_in_iframe.html"));
ui_test_utils::NavigateToURL(browser(), url);
- EXPECT_TRUE(GetActiveTabSpecificContentSettings()->IsContentBlocked(
- CONTENT_SETTINGS_TYPE_MIXEDSCRIPT));
-
- scoped_ptr<ContentSettingBubbleModel> model(
- ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- browser()->content_setting_bubble_model_delegate(),
- browser()->tab_strip_model()->GetActiveWebContents(),
- browser()->profile(),
- CONTENT_SETTINGS_TYPE_MIXEDSCRIPT));
- model->OnCustomLinkClicked();
-
- content::TestNavigationObserver observer(
- browser()->tab_strip_model()->GetActiveWebContents());
- observer.Wait();
-
+ // Blink does not ask the browser to handle mixed content in the case
+ // of active subresources in an iframe, so the content type should not
+ // be marked as blocked.
EXPECT_FALSE(GetActiveTabSpecificContentSettings()->IsContentBlocked(
CONTENT_SETTINGS_TYPE_MIXEDSCRIPT));
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/mixedContent/active-subresource-in-iframe-blocked.https.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698