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

Unified Diff: content/browser/frame_host/render_frame_host_manager_browsertest.cc

Issue 743773003: OOPIF: Data URLs are now rendered in the renderer that initiated the navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing android compile Created 6 years 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: content/browser/frame_host/render_frame_host_manager_browsertest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
index 6a99c58c17d8009860d5f293621a02a573030cf0..2b5f179e75e38cd192dd5228f5a8d95a2b59fd5e 100644
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
@@ -132,9 +132,7 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, NoScriptAccessAfterSwapOut) {
new_shell->web_contents()->GetLastCommittedURL().path());
// Should have the same SiteInstance.
- scoped_refptr<SiteInstance> blank_site_instance(
- new_shell->web_contents()->GetSiteInstance());
- EXPECT_EQ(orig_site_instance, blank_site_instance);
+ EXPECT_EQ(orig_site_instance, new_shell->web_contents()->GetSiteInstance());
// We should have access to the opened window's location.
success = false;
@@ -157,6 +155,29 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, NoScriptAccessAfterSwapOut) {
"window.domAutomationController.send(testScriptAccessToWindow());",
&success));
EXPECT_FALSE(success);
+
+ // We now navigate the window to an about:blank page.
+ success = false;
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell()->web_contents(),
+ "window.domAutomationController.send(clickBlankTargetedLink());",
+ &success));
+ EXPECT_TRUE(success);
+
+ // Wait for the navigation in the new window to finish.
+ WaitForLoadStop(new_shell->web_contents());
+ GURL blank_url(url::kAboutBlankURL);
+ EXPECT_EQ(blank_url,
+ new_shell->web_contents()->GetLastCommittedURL());
+ EXPECT_EQ(orig_site_instance, new_shell->web_contents()->GetSiteInstance());
+
+ // We should have access to the opened window's location.
+ success = false;
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell()->web_contents(),
+ "window.domAutomationController.send(testScriptAccessToWindow());",
+ &success));
+ EXPECT_TRUE(success);
}
// Test for crbug.com/24447. Following a cross-site link with rel=noreferrer
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/frame_host/render_frame_proxy_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698