Chromium Code Reviews| 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..817cb905baf867ef4b9065a019ccfbdfe527e65f 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-domain. |
| 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-platform; ensure that dialogs work. |
|
Charlie Reis
2016/04/08 17:27:39
nit: cross-site
(I don't think we support cross-p
nasko
2016/04/08 17:33:23
nit: s/cross-platform/cross-site/?
Avi (use Gerrit)
2016/04/08 17:44:01
Brain-o.
|
| + 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); |
| } |