Chromium Code Reviews| 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 a19420269a66201abecc1d1e0ca5ab088cf45833..1d45c7df0a402dcdf640f88c19deb1d4ed1d25fe 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc |
| @@ -157,6 +157,30 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, NoScriptAccessAfterSwapOut) { |
| "window.domAutomationController.send(testScriptAccessToWindow());", |
| &success)); |
| EXPECT_FALSE(success); |
| + |
| + // We now navigate to a blank window. |
|
Charlie Reis
2014/12/11 00:43:39
nit: We now navigate the window to an about:blank
lfg
2014/12/11 23:55:24
Done.
|
| + 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()); |
| + EXPECT_EQ("blank", |
|
Charlie Reis
2014/12/11 00:43:39
Let's just compare GetLastCommittedURL() to GURL(k
lfg
2014/12/11 23:55:24
Done.
|
| + new_shell->web_contents()->GetLastCommittedURL().path()); |
| + scoped_refptr<SiteInstance> blank_site_instance2( |
|
Charlie Reis
2014/12/11 00:43:39
This can then be blank_site_instance.
lfg
2014/12/11 23:55:24
Removed, as we don't need to save the reference in
|
| + new_shell->web_contents()->GetSiteInstance()); |
| + EXPECT_EQ(orig_site_instance, blank_site_instance2); |
| + |
| + // 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 |