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

Unified Diff: content/browser/frame_host/navigator_impl_unittest.cc

Issue 2857213005: PlzNavigate: implement process reuse for ServiceWorkers (Closed)
Patch Set: Addressed comments + fixed tests Created 3 years, 7 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
Index: content/browser/frame_host/navigator_impl_unittest.cc
diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc
index c0b0d8df6f61cbc0c575a175cabfe66137c4f2e4..99fd473fc60070935e57df5aff39d54e292e61a4 100644
--- a/content/browser/frame_host/navigator_impl_unittest.cc
+++ b/content/browser/frame_host/navigator_impl_unittest.cc
@@ -252,14 +252,22 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
EXPECT_FALSE(node->navigation_request());
// Commit the navigation.
- main_test_rfh()->SendNavigate(0, true, kUrl2);
+ if (AreAllSitesIsolatedForTesting()) {
+ GetSpeculativeRenderFrameHost(node)->SendNavigate(0, true, kUrl2);
+ } else {
+ main_test_rfh()->SendNavigate(0, true, kUrl2);
+ }
EXPECT_TRUE(main_test_rfh()->is_active());
EXPECT_EQ(kUrl2, contents()->GetLastCommittedURL());
EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
EXPECT_FALSE(node->render_manager()->pending_frame_host());
- // The SiteInstance did not change.
- EXPECT_EQ(site_instance_id_1, main_test_rfh()->GetSiteInstance()->GetId());
+ // The SiteInstance did not change unless site-per-process is enabled.
+ if (AreAllSitesIsolatedForTesting()) {
+ EXPECT_NE(site_instance_id_1, main_test_rfh()->GetSiteInstance()->GetId());
+ } else {
+ EXPECT_EQ(site_instance_id_1, main_test_rfh()->GetSiteInstance()->GetId());
+ }
}
// PlzNavigate: Test that a beforeUnload denial cancels the navigation.
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698