Chromium Code Reviews| 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 ba4a49d1d4de3f05005e651f220a64d46afd8550..8a6c268390b96616340672f04479e4680073abc6 100644 |
| --- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
| +++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
| @@ -186,9 +186,19 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |
| EXPECT_EQ(1, controller.GetEntryCount()); |
| EXPECT_EQ(1, RendererHistoryLength(shell())); |
| - EXPECT_TRUE(NavigateToURLAndReplace(shell(), GURL("data:text/html,page2"))); |
| - EXPECT_EQ(1, controller.GetEntryCount()); |
| - EXPECT_EQ(1, RendererHistoryLength(shell())); |
| + EXPECT_TRUE(NavigateToURL(shell(), GURL("data:text/html,page2"))); |
| + EXPECT_EQ(2, controller.GetEntryCount()); |
| + EXPECT_EQ(2, RendererHistoryLength(shell())); |
| + |
| + // Go back and then replace the first entry. |
| + controller.GoBack(); |
| + EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); |
| + EXPECT_TRUE(controller.CanGoForward()); |
| + |
| + EXPECT_TRUE(NavigateToURLAndReplace(shell(), GURL("data:text/html,page1b"))); |
| + EXPECT_EQ(2, controller.GetEntryCount()); |
| + EXPECT_EQ(2, RendererHistoryLength(shell())); |
| + EXPECT_TRUE(controller.CanGoForward()); |
|
Avi (use Gerrit)
2015/07/16 20:00:16
Are you sure that this change keeps testing the sa
Charlie Reis
2015/07/16 20:17:43
Good point. The fact that I only had one addition
|
| // Note that there's no way to access the renderer's notion of the history |
| // offset via JavaScript. Checking just the history length, though, is enough; |