| Index: content/browser/site_per_process_browsertest.cc
|
| diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
|
| index a40bef1db90666c0f6d2a55f8a6a3286303932ac..2a4cc3ccf4644a9fa9ec2d8ac56246c2deed5c3c 100644
|
| --- a/content/browser/site_per_process_browsertest.cc
|
| +++ b/content/browser/site_per_process_browsertest.cc
|
| @@ -1342,35 +1342,45 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, NavigateRemoteAfterError) {
|
| ->GetFrameTree()
|
| ->root();
|
|
|
| - TestNavigationObserver observer(shell()->web_contents());
|
| -
|
| // Load same-site page into iframe.
|
| - FrameTreeNode* child = root->child_at(0);
|
| - GURL http_url(embedded_test_server()->GetURL("a.com", "/title1.html"));
|
| - NavigateFrameToURL(child, http_url);
|
| - EXPECT_EQ(http_url, observer.last_navigation_url());
|
| - EXPECT_TRUE(observer.last_navigation_succeeded());
|
| + {
|
| + TestNavigationObserver observer(shell()->web_contents());
|
| + FrameTreeNode* child = root->child_at(0);
|
| + GURL http_url(embedded_test_server()->GetURL("a.com", "/title1.html"));
|
| + NavigateFrameToURL(child, http_url);
|
| + EXPECT_EQ(http_url, observer.last_navigation_url());
|
| + EXPECT_TRUE(observer.last_navigation_succeeded());
|
| + observer.Wait();
|
| + }
|
|
|
| // Load cross-site page into iframe.
|
| - GURL url = embedded_test_server()->GetURL("foo.com", "/title2.html");
|
| - NavigateFrameToURL(root->child_at(0), url);
|
| - EXPECT_TRUE(observer.last_navigation_succeeded());
|
| - EXPECT_EQ(url, observer.last_navigation_url());
|
| + {
|
| + TestNavigationObserver observer(shell()->web_contents());
|
| + FrameTreeNode* child = root->child_at(0);
|
| + GURL url = embedded_test_server()->GetURL("foo.com", "/title2.html");
|
| + NavigateFrameToURL(root->child_at(0), url);
|
| + EXPECT_TRUE(observer.last_navigation_succeeded());
|
| + EXPECT_EQ(url, observer.last_navigation_url());
|
| + observer.Wait();
|
|
|
| - // Ensure that we have created a new process for the subframe.
|
| - EXPECT_EQ(
|
| - " Site A ------------ proxies for B\n"
|
| - " +--Site B ------- proxies for A\n"
|
| - "Where A = http://a.com/\n"
|
| - " B = http://foo.com/",
|
| - DepictFrameTree(root));
|
| - SiteInstance* site_instance = child->current_frame_host()->GetSiteInstance();
|
| - EXPECT_NE(shell()->web_contents()->GetSiteInstance(), site_instance);
|
| + // Ensure that we have created a new process for the subframe.
|
| + EXPECT_EQ(
|
| + " Site A ------------ proxies for B\n"
|
| + " +--Site B ------- proxies for A\n"
|
| + "Where A = http://a.com/\n"
|
| + " B = http://foo.com/",
|
| + DepictFrameTree(root));
|
| + SiteInstance* site_instance =
|
| + child->current_frame_host()->GetSiteInstance();
|
| + EXPECT_NE(shell()->web_contents()->GetSiteInstance(), site_instance);
|
| + }
|
|
|
| // Stop the test server and try to navigate the remote frame.
|
| - url = embedded_test_server()->GetURL("bar.com", "/title3.html");
|
| - EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete());
|
| - NavigateIframeToURL(shell()->web_contents(), "child-0", url);
|
| + {
|
| + GURL url = embedded_test_server()->GetURL("bar.com", "/title3.html");
|
| + EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete());
|
| + NavigateIframeToURL(shell()->web_contents(), "child-0", url);
|
| + }
|
| }
|
|
|
| // Ensure that a cross-site page ends up in the correct process when it
|
|
|