| Index: chrome/browser/tab_contents/navigation_controller_unittest.cc
|
| diff --git a/chrome/browser/tab_contents/navigation_controller_unittest.cc b/chrome/browser/tab_contents/navigation_controller_unittest.cc
|
| index 91c23eaaffe3f09635636e053f1fe8961323f0ed..1935457e58a6e5476b28f71ea40694204fa27dcb 100644
|
| --- a/chrome/browser/tab_contents/navigation_controller_unittest.cc
|
| +++ b/chrome/browser/tab_contents/navigation_controller_unittest.cc
|
| @@ -1725,6 +1725,7 @@ TEST_F(NavigationControllerTest, CopyStateFromAndPrune) {
|
|
|
| scoped_ptr<TestTabContents> other_contents(CreateTestTabContents());
|
| NavigationController& other_controller = other_contents->controller();
|
| + SessionID other_id(other_controller.session_id());
|
| other_contents->NavigateAndCommit(url3);
|
| other_controller.CopyStateFromAndPrune(&controller());
|
|
|
| @@ -1738,10 +1739,9 @@ TEST_F(NavigationControllerTest, CopyStateFromAndPrune) {
|
| EXPECT_EQ(url2, other_controller.GetEntryAtIndex(1)->url());
|
| EXPECT_EQ(url3, other_controller.GetEntryAtIndex(2)->url());
|
|
|
| - // The session id of the new tab should be that of the old, and the old should
|
| - // get a new id.
|
| - EXPECT_EQ(id.id(), other_controller.session_id().id());
|
| - EXPECT_NE(id.id(), controller().session_id().id());
|
| + // Make sure session ids didn't change.
|
| + EXPECT_EQ(id.id(), controller().session_id().id());
|
| + EXPECT_EQ(other_id.id(), other_controller.session_id().id());
|
| }
|
|
|
| // Test CopyStateFromAndPrune with 2 urls, the first selected and nothing in
|
| @@ -1758,6 +1758,7 @@ TEST_F(NavigationControllerTest, CopyStateFromAndPrune2) {
|
|
|
| scoped_ptr<TestTabContents> other_contents(CreateTestTabContents());
|
| NavigationController& other_controller = other_contents->controller();
|
| + SessionID other_id(other_controller.session_id());
|
| other_controller.CopyStateFromAndPrune(&controller());
|
|
|
| // other_controller should now contain the 1 url: url1.
|
| @@ -1768,10 +1769,9 @@ TEST_F(NavigationControllerTest, CopyStateFromAndPrune2) {
|
|
|
| EXPECT_EQ(url1, other_controller.GetEntryAtIndex(0)->url());
|
|
|
| - // The session id of the new tab should be that of the old, and the old should
|
| - // get a new id.
|
| - EXPECT_EQ(id.id(), other_controller.session_id().id());
|
| - EXPECT_NE(id.id(), controller().session_id().id());
|
| + // Make sure session ids didn't change.
|
| + EXPECT_EQ(id.id(), controller().session_id().id());
|
| + EXPECT_EQ(other_id.id(), other_controller.session_id().id());
|
| }
|
|
|
| // Test CopyStateFromAndPrune with 2 urls, the first selected and nothing in
|
| @@ -1788,6 +1788,7 @@ TEST_F(NavigationControllerTest, CopyStateFromAndPrune3) {
|
|
|
| scoped_ptr<TestTabContents> other_contents(CreateTestTabContents());
|
| NavigationController& other_controller = other_contents->controller();
|
| + SessionID other_id(other_controller.session_id());
|
| other_controller.LoadURL(url3, GURL(), PageTransition::TYPED);
|
| other_controller.CopyStateFromAndPrune(&controller());
|
|
|
| @@ -1805,10 +1806,9 @@ TEST_F(NavigationControllerTest, CopyStateFromAndPrune3) {
|
|
|
| EXPECT_EQ(url3, other_controller.pending_entry()->url());
|
|
|
| - // The session id of the new tab should be that of the old, and the old should
|
| - // be get a new id.
|
| - EXPECT_EQ(id.id(), other_controller.session_id().id());
|
| - EXPECT_NE(id.id(), controller().session_id().id());
|
| + // Make sure session ids didn't change.
|
| + EXPECT_EQ(id.id(), controller().session_id().id());
|
| + EXPECT_EQ(other_id.id(), other_controller.session_id().id());
|
| }
|
|
|
| // Tests that navigations initiated from the page (with the history object)
|
|
|