| Index: content/browser/web_contents/navigation_controller_impl_unittest.cc
|
| diff --git a/content/browser/web_contents/navigation_controller_impl_unittest.cc b/content/browser/web_contents/navigation_controller_impl_unittest.cc
|
| index a1904d04e2de3d9da87c046157cdf89cb64bbf2a..0bd6521dcafd634b6454afaa4750ef902e8ee4dd 100644
|
| --- a/content/browser/web_contents/navigation_controller_impl_unittest.cc
|
| +++ b/content/browser/web_contents/navigation_controller_impl_unittest.cc
|
| @@ -1959,6 +1959,31 @@ TEST_F(NavigationControllerTest, InPage) {
|
| EXPECT_EQ(forward_params.url,
|
| controller.GetActiveEntry()->GetURL());
|
|
|
| + // Go back and forward again. This time renderer claims it's in page
|
| + // navigation.
|
| + ViewHostMsg_FrameNavigate_Params second_back_params(back_params);
|
| + second_back_params.was_within_same_page = true;
|
| + controller.GoBack();
|
| + EXPECT_TRUE(controller.RendererDidNavigate(second_back_params, &details));
|
| + EXPECT_EQ(1U, navigation_entry_committed_counter_);
|
| + navigation_entry_committed_counter_ = 0;
|
| + EXPECT_TRUE(details.is_in_page);
|
| + EXPECT_EQ(2, controller.GetEntryCount());
|
| + EXPECT_EQ(0, controller.GetCurrentEntryIndex());
|
| + EXPECT_EQ(second_back_params.url, controller.GetActiveEntry()->GetURL());
|
| +
|
| + ViewHostMsg_FrameNavigate_Params second_forward_params(forward_params);
|
| + second_forward_params.was_within_same_page = true;
|
| + controller.GoForward();
|
| + EXPECT_TRUE(controller.RendererDidNavigate(second_forward_params, &details));
|
| + EXPECT_EQ(1U, navigation_entry_committed_counter_);
|
| + navigation_entry_committed_counter_ = 0;
|
| + EXPECT_TRUE(details.is_in_page);
|
| + EXPECT_EQ(2, controller.GetEntryCount());
|
| + EXPECT_EQ(1, controller.GetCurrentEntryIndex());
|
| + EXPECT_EQ(second_forward_params.url,
|
| + controller.GetActiveEntry()->GetURL());
|
| +
|
| // Now go back and forward again. This is to work around a bug where we would
|
| // compare the incoming URL with the last committed entry rather than the
|
| // one identified by an existing page ID. This would result in the second URL
|
|
|