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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 1722613002: PlzNavigate: make SitePerProcessBrowserTest.NavigateRemoteAfterError work (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-policy
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 24af2a89cafc7ca31f31f6bcd2e2ea655ccbc3ed..01f5337ec661a418efb20dfc6b404ddbe8745211 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -1342,33 +1342,42 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, NavigateRemoteAfterError) {
->GetFrameTree()
->root();
- TestNavigationObserver observer(shell()->web_contents());
nasko 2016/02/25 19:58:40 nit: No need for two empty lines. Remove one of th
clamy 2016/02/26 11:04:16 Done.
// 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");
+ GURL url = embedded_test_server()->GetURL("bar.com", "/title3.html");
nasko 2016/02/25 19:58:41 nit: Since all navigations are done now in local s
clamy 2016/02/26 11:04:16 Done.
EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete());
NavigateIframeToURL(shell()->web_contents(), "child-0", url);
}
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698