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 9aacb49b0e91ef4143019bde521851eae795c131..94109ac3fdad2906d2daf4e2ce9725e2a853584d 100644 |
| --- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
| +++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc |
| @@ -5011,6 +5011,32 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |
| GURL(exploded_state.top.children.at(0).url_string.string())); |
| } |
| +// Start a provisional navigation, but abort it by going back before it commits |
|
Charlie Reis
2016/07/28 18:22:29
nit: Missing period.
Charlie Harrison
2016/07/28 18:30:52
Done.
|
| +// In crbug.com/631617 there was an issue which cleared the |
| +// pending_navigation_params_ in RenderFrameImpl. This caused the abort-er |
|
Charlie Reis
2016/07/28 18:22:29
nit: s/abort-er/interrupting/
Charlie Harrison
2016/07/28 18:30:52
Done.
|
| +// navigation to lose important navigation data like its nav_entry_id, which |
| +// could cause it to commit in-place instead of in the correct location in the |
| +// browsing history. |
| +IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |
| + AbortProvisionalLoadRetainsNavigationParams) { |
| + EXPECT_TRUE( |
| + NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html"))); |
| + EXPECT_TRUE( |
| + NavigateToURL(shell(), embedded_test_server()->GetURL("/title2.html"))); |
| + |
| + shell()->LoadURL(embedded_test_server()->GetURL("/slow?30")); |
|
Charlie Reis
2016/07/28 18:22:29
Can we use a TestNavigationManager here to pause a
Charlie Harrison
2016/07/28 18:30:52
Yupp. Done.
|
| + |
| + NavigationController& controller = shell()->web_contents()->GetController(); |
| + |
| + TestNavigationManager back_manager( |
| + shell()->web_contents(), embedded_test_server()->GetURL("/title1.html")); |
| + controller.GoBack(); |
| + back_manager.WaitForNavigationFinished(); |
| + |
| + EXPECT_TRUE(controller.CanGoForward()); |
| + EXPECT_EQ(0, controller.GetCurrentEntryIndex()); |
| +} |
| + |
| // Ensure that we do not corrupt a NavigationEntry's PageState if two forward |
| // navigations compete in different frames. See https://crbug.com/623319. |
| IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |