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

Unified Diff: chrome/browser/chrome_site_per_process_browsertest.cc

Issue 1168913002: Use top frame's origin when checking content settings for plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years, 4 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 | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_site_per_process_browsertest.cc
diff --git a/chrome/browser/chrome_site_per_process_browsertest.cc b/chrome/browser/chrome_site_per_process_browsertest.cc
index de2a9879a485ea0a6587b774a4065fce4bc0adb2..58a3ecbdec07fa38ad3e59317828db2e7e86cdae 100644
--- a/chrome/browser/chrome_site_per_process_browsertest.cc
+++ b/chrome/browser/chrome_site_per_process_browsertest.cc
@@ -97,3 +97,25 @@ IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest,
"window.webkitRequestFileSystem("
"window.TEMPORARY, 1024, function() {});"));
}
+
+// Ensure that creating a plugin in a cross-site subframe doesn't crash. This
+// involves querying content settings from the renderer process and using the
+// top frame's origin as one of the parameters. See https://crbug.com/426658.
+IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest, PluginWithRemoteTopFrame) {
+ GURL main_url(embedded_test_server()->GetURL("a.com", "/iframe.html"));
+ ui_test_utils::NavigateToURL(browser(), main_url);
+
+ // Navigate subframe to a page with a Flash object.
+ content::WebContents* active_web_contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ GURL frame_url = embedded_test_server()->GetURL("b.com", "/object.html");
nasko 2015/08/20 20:44:23 nit: flash_object.html, as object.html is a bit to
alexmos 2015/08/20 21:23:44 Done.
+ content::DOMMessageQueue msg_queue;
+ EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", frame_url));
+
+ // Ensure the page finishes loading without crashing.
+ std::string status;
+ while (msg_queue.WaitForMessage(&status)) {
+ if (status == "\"DONE\"")
+ break;
+ }
+}
« no previous file with comments | « no previous file | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698