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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 EXPECT_TRUE(ExecuteScriptAndExtractBool( 90 EXPECT_TRUE(ExecuteScriptAndExtractBool(
91 frame_host, 91 frame_host,
92 "window.domAutomationController.send(!!openDatabase(" 92 "window.domAutomationController.send(!!openDatabase("
93 "'foodb', '1.0', 'Test DB', 1024));", 93 "'foodb', '1.0', 'Test DB', 1024));",
94 &is_object_created)); 94 &is_object_created));
95 EXPECT_TRUE(is_object_created); 95 EXPECT_TRUE(is_object_created);
96 EXPECT_TRUE(ExecuteScript(frame_host, 96 EXPECT_TRUE(ExecuteScript(frame_host,
97 "window.webkitRequestFileSystem(" 97 "window.webkitRequestFileSystem("
98 "window.TEMPORARY, 1024, function() {});")); 98 "window.TEMPORARY, 1024, function() {});"));
99 } 99 }
100
101 // Ensure that creating a plugin in a cross-site subframe doesn't crash. This
102 // involves querying content settings from the renderer process and using the
103 // top frame's origin as one of the parameters. See https://crbug.com/426658.
104 IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest, PluginWithRemoteTopFrame) {
105 GURL main_url(embedded_test_server()->GetURL("a.com", "/iframe.html"));
106 ui_test_utils::NavigateToURL(browser(), main_url);
107
108 // Navigate subframe to a page with a Flash object.
109 content::WebContents* active_web_contents =
110 browser()->tab_strip_model()->GetActiveWebContents();
111 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.
112 content::DOMMessageQueue msg_queue;
113 EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", frame_url));
114
115 // Ensure the page finishes loading without crashing.
116 std::string status;
117 while (msg_queue.WaitForMessage(&status)) {
118 if (status == "\"DONE\"")
119 break;
120 }
121 }
OLDNEW
« 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