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 27e9a466f6723d4f74c90004e9fe4eda36c6c96f..8585230b8704d38a0704cc4057783d0d75b5f0f4 100644 |
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
@@ -507,21 +507,25 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |
NavigationController& controller = |
shell()->web_contents()->GetController(); |
- EXPECT_TRUE(NavigateToURL(shell(), GURL("data:text/html,page1"))); |
+ EXPECT_TRUE(NavigateToURL( |
+ shell(), embedded_test_server()->GetURL("/simple_page.html"))); |
EXPECT_EQ(1, controller.GetEntryCount()); |
EXPECT_EQ(1, RendererHistoryLength(shell())); |
- EXPECT_TRUE(RendererLocationReplace(shell(), GURL("data:text/html,page1a"))); |
+ EXPECT_TRUE(RendererLocationReplace( |
+ shell(), embedded_test_server()->GetURL("/simple_page.html?page1"))); |
nasko
2017/03/27 21:39:19
Why not navigate to completely different pages? We
meacer
2017/03/27 22:15:46
That's convenient :)
|
EXPECT_EQ(1, controller.GetEntryCount()); |
EXPECT_EQ(1, RendererHistoryLength(shell())); |
// Now create two more entries and go back, to test replacing an entry without |
// pruning the forward history. |
- EXPECT_TRUE(NavigateToURL(shell(), GURL("data:text/html,page2"))); |
+ EXPECT_TRUE(NavigateToURL( |
+ shell(), embedded_test_server()->GetURL("/simple_page.html?page2"))); |
EXPECT_EQ(2, controller.GetEntryCount()); |
EXPECT_EQ(2, RendererHistoryLength(shell())); |
- EXPECT_TRUE(NavigateToURL(shell(), GURL("data:text/html,page3"))); |
+ EXPECT_TRUE(NavigateToURL( |
+ shell(), embedded_test_server()->GetURL("/simple_page.html?page3"))); |
EXPECT_EQ(3, controller.GetEntryCount()); |
EXPECT_EQ(3, RendererHistoryLength(shell())); |
@@ -531,7 +535,8 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |
EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); |
EXPECT_TRUE(controller.CanGoForward()); |
- EXPECT_TRUE(RendererLocationReplace(shell(), GURL("data:text/html,page1b"))); |
+ EXPECT_TRUE(RendererLocationReplace( |
+ shell(), embedded_test_server()->GetURL("/simple_page.html?page1b"))); |
EXPECT_EQ(3, controller.GetEntryCount()); |
EXPECT_EQ(3, RendererHistoryLength(shell())); |
EXPECT_TRUE(controller.CanGoForward()); |
@@ -6278,18 +6283,23 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |
InPageNavigationDoesNotClearFavicon) { |
// Load a page and fake a favicon for it. |
NavigationController& controller = shell()->web_contents()->GetController(); |
- ASSERT_TRUE(NavigateToURL(shell(), GURL("data:text/html,page1"))); |
+ ASSERT_TRUE(NavigateToURL( |
+ shell(), embedded_test_server()->GetURL("/simple_page.html"))); |
content::NavigationEntry* entry = controller.GetLastCommittedEntry(); |
ASSERT_TRUE(entry); |
content::FaviconStatus& favicon_status = entry->GetFavicon(); |
favicon_status.valid = true; |
- ASSERT_TRUE(RendererLocationReplace(shell(), GURL("data:text/html,page1#"))); |
+ ASSERT_TRUE(RendererLocationReplace( |
+ shell(), embedded_test_server()->GetURL( |
+ "/simple_page.html#same-page-navigation"))); |
nasko
2017/03/27 21:39:19
nit: same-document-navigation, we are phasing out
meacer
2017/03/27 22:15:46
Done.
|
entry = controller.GetLastCommittedEntry(); |
content::FaviconStatus& favicon_status2 = entry->GetFavicon(); |
EXPECT_TRUE(favicon_status2.valid); |
- ASSERT_TRUE(RendererLocationReplace(shell(), GURL("data:text/html,page2"))); |
+ ASSERT_TRUE(RendererLocationReplace( |
+ shell(), |
+ embedded_test_server()->GetURL("/simple_page.html?new-navigation"))); |
entry = controller.GetLastCommittedEntry(); |
content::FaviconStatus& favicon_status3 = entry->GetFavicon(); |
EXPECT_FALSE(favicon_status3.valid); |