Index: content/browser/tab_contents/navigation_controller_unittest.cc |
=================================================================== |
--- content/browser/tab_contents/navigation_controller_unittest.cc (revision 96734) |
+++ content/browser/tab_contents/navigation_controller_unittest.cc (working copy) |
@@ -1847,6 +1847,9 @@ |
scoped_ptr<TestTabContents> other_contents(CreateTestTabContents()); |
NavigationController& other_controller = other_contents->controller(); |
other_contents->NavigateAndCommit(url3); |
+ other_contents->ExpectSetHistoryLengthAndPrune( |
+ other_controller.GetEntryAtIndex(0)->site_instance(), 2, |
+ other_controller.GetEntryAtIndex(0)->page_id()); |
other_controller.CopyStateFromAndPrune(&controller(), false); |
// other_controller should now contain the 3 urls: url1, url2 and url3. |
@@ -1873,6 +1876,7 @@ |
scoped_ptr<TestTabContents> other_contents(CreateTestTabContents()); |
NavigationController& other_controller = other_contents->controller(); |
+ other_contents->ExpectSetHistoryLengthAndPrune(NULL, 1, -1); |
other_controller.CopyStateFromAndPrune(&controller(), false); |
// other_controller should now contain the 1 url: url1. |
@@ -1898,6 +1902,7 @@ |
scoped_ptr<TestTabContents> other_contents(CreateTestTabContents()); |
NavigationController& other_controller = other_contents->controller(); |
other_controller.LoadURL(url3, GURL(), PageTransition::TYPED); |
+ other_contents->ExpectSetHistoryLengthAndPrune(NULL, 1, -1); |
other_controller.CopyStateFromAndPrune(&controller(), false); |
// other_controller should now contain 1 entry for url1, and a pending entry |
@@ -1924,6 +1929,7 @@ |
scoped_ptr<TestTabContents> other_contents(CreateTestTabContents()); |
NavigationController& other_controller = other_contents->controller(); |
+ other_contents->ExpectSetHistoryLengthAndPrune(NULL, 1, -1); |
other_controller.CopyStateFromAndPrune(&controller(), true); |
// other_controller should now contain 1 entry for url1. |
@@ -1949,6 +1955,10 @@ |
scoped_ptr<TestTabContents> other_contents(CreateTestTabContents()); |
NavigationController& other_controller = other_contents->controller(); |
other_contents->NavigateAndCommit(url2); |
+ other_contents->ExpectSetHistoryLengthAndPrune( |
+ other_controller.GetEntryAtIndex(0)->site_instance(), |
+ 1, |
+ other_controller.GetEntryAtIndex(0)->page_id() + 1); |
other_controller.CopyStateFromAndPrune(&controller(), true); |
// other_controller should now contain 1 entry, url1. |
@@ -1974,6 +1984,10 @@ |
NavigationController& other_controller = other_contents->controller(); |
other_contents->NavigateAndCommit(url2); |
other_controller.LoadURL(url3, GURL(), PageTransition::TYPED); |
+ other_contents->ExpectSetHistoryLengthAndPrune( |
+ other_controller.GetEntryAtIndex(0)->site_instance(), |
+ 1, |
+ other_controller.GetEntryAtIndex(0)->page_id() + 1); |
other_controller.CopyStateFromAndPrune(&controller(), true); |
// other_controller should now contain 2 entries: url1, and url3. |