Index: content/browser/frame_host/navigation_controller_impl_browsertest.cc |
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
index 1fd83625b7501502d1c8be4b9b7a388c718a4528..ccf6a776886ce2bf600b2e6f038b5230c85e1a5f 100644 |
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
@@ -575,14 +575,24 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |
const GURL page_url = embedded_test_server()->GetURL( |
"/navigation_controller/simple_page_1.html"); |
- // Use data scheme first so that the next page will be loaded |
+ // Use a chrome:// url first so that the next page will be loaded |
// in a separate site instance. |
- EXPECT_TRUE(NavigateToURL(shell(), GURL("data:text/html,page1"))); |
+ GURL initial_url(std::string(kChromeUIScheme) + |
+ url::kStandardSchemeSeparator + kChromeUIGpuHost); |
+ EXPECT_TRUE(NavigateToURL(shell(), initial_url)); |
EXPECT_EQ(1, controller.GetEntryCount()); |
EXPECT_NE(-1, shell()->web_contents()->GetMaxPageID()); |
+ int initial_renderer_id = |
+ shell()->web_contents()->GetRenderProcessHost()->GetID(); |
nasko
2016/09/14 22:33:22
nit: Usually SiteInstance is used for comparison w
|
// Now navigate and replace the current entry. |
RendererLocationReplace(shell(), page_url); |
+ |
+ // Verify that process swap actually occured. |
+ EXPECT_NE(initial_renderer_id, |
+ shell()->web_contents()->GetRenderProcessHost()->GetID()); |
+ |
+ // The navigation entry should have been replaced. |
EXPECT_EQ(1, controller.GetEntryCount()); |
// Page ID should be updated. |