| Index: content/browser/web_contents/web_contents_impl_browsertest.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
|
| index 4ef56690dc2802bd2b6b5e226722a0c04e26fa0b..6534b140d49ebc3ae4866eac2a78143fbc8f25eb 100644
|
| --- a/content/browser/web_contents/web_contents_impl_browsertest.cc
|
| +++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
|
| @@ -968,7 +968,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
|
| dialog_manager.Wait();
|
| EXPECT_EQ("about:blank", dialog_manager.last_message());
|
|
|
| - // Navigate cross-domain.
|
| + // Navigate the subframe cross-site.
|
| NavigateFrameToURL(frame,
|
| embedded_test_server()->GetURL("b.com", "/title2.html"));
|
| EXPECT_TRUE(WaitForLoadStop(wc));
|
| @@ -980,14 +980,6 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
|
| EXPECT_EQ(GURL("http://b.com/title2.html"),
|
| GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
|
|
|
| - // Dialogs do not work with out-of-process iframes yet.
|
| - // http://crbug.com/453893
|
| - if (SiteIsolationPolicy::UseSubframeNavigationEntries()) {
|
| - wc->SetDelegate(nullptr);
|
| - wc->SetJavaScriptDialogManagerForTesting(nullptr);
|
| - return; // :(
|
| - }
|
| -
|
| // A dialog from the main frame.
|
| EXPECT_TRUE(
|
| content::ExecuteScript(root->current_frame_host(), alert_location));
|
| @@ -995,6 +987,25 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
|
| EXPECT_EQ(GURL("http://a.com/title1.html"),
|
| GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
|
|
|
| + // Navigate the top frame cross-site; ensure that dialogs work.
|
| + NavigateToURL(shell(),
|
| + embedded_test_server()->GetURL("c.com", "/title3.html"));
|
| + EXPECT_TRUE(WaitForLoadStop(wc));
|
| + EXPECT_TRUE(
|
| + content::ExecuteScript(root->current_frame_host(), alert_location));
|
| + dialog_manager.Wait();
|
| + EXPECT_EQ(GURL("http://c.com/title3.html"),
|
| + GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
|
| +
|
| + // Navigate back; ensure that dialogs work.
|
| + wc->GetController().GoBack();
|
| + EXPECT_TRUE(WaitForLoadStop(wc));
|
| + EXPECT_TRUE(
|
| + content::ExecuteScript(root->current_frame_host(), alert_location));
|
| + dialog_manager.Wait();
|
| + EXPECT_EQ(GURL("http://a.com/title1.html"),
|
| + GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
|
| +
|
| wc->SetDelegate(nullptr);
|
| wc->SetJavaScriptDialogManagerForTesting(nullptr);
|
| }
|
|
|