Chromium Code Reviews| Index: content/browser/frame_host/navigation_controller_impl_unittest.cc |
| diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc |
| index 7a77cd69ab39ad3cf036b518383c4fb60f33c76b..4398b7040fa10a4f99a4c2bf248d5f48f2487272 100644 |
| --- a/content/browser/frame_host/navigation_controller_impl_unittest.cc |
| +++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc |
| @@ -1313,13 +1313,13 @@ TEST_F(NavigationControllerTest, ResetEntryValuesAfterCommit) { |
| pending_entry->set_is_renderer_initiated(true); |
| pending_entry->set_transferred_global_request_id(transfer_id); |
| pending_entry->set_should_replace_entry(true); |
| - pending_entry->set_redirect_chain(redirects); |
| + pending_entry->SetRedirectChain(redirects); |
| pending_entry->set_should_clear_history_list(true); |
| EXPECT_EQ(post_data.get(), pending_entry->GetBrowserInitiatedPostData()); |
| EXPECT_TRUE(pending_entry->is_renderer_initiated()); |
| EXPECT_EQ(transfer_id, pending_entry->transferred_global_request_id()); |
| EXPECT_TRUE(pending_entry->should_replace_entry()); |
| - EXPECT_EQ(1U, pending_entry->redirect_chain().size()); |
| + EXPECT_EQ(1U, pending_entry->GetRedirectChain().size()); |
| EXPECT_TRUE(pending_entry->should_clear_history_list()); |
| main_test_rfh()->SendNavigate(0, url1); |
| @@ -1334,8 +1334,18 @@ TEST_F(NavigationControllerTest, ResetEntryValuesAfterCommit) { |
| EXPECT_EQ(GlobalRequestID(-1, -1), |
| committed_entry->transferred_global_request_id()); |
| EXPECT_FALSE(committed_entry->should_replace_entry()); |
| - EXPECT_EQ(0U, committed_entry->redirect_chain().size()); |
| + EXPECT_EQ(0U, committed_entry->GetRedirectChain().size()); |
| EXPECT_FALSE(committed_entry->should_clear_history_list()); |
| + |
| + // If the navigate parameters include redirects, they will be preserved |
| + // in the committed entry. |
| + main_test_rfh()->SendNavigateWithRedirects(0, url1, redirects); |
|
Charlie Reis
2014/04/05 00:09:10
This sounds like it should be in a test of its own
Donn Denman
2014/04/09 21:09:21
Done.
|
| + NavigationEntryImpl* committed_entry_with_redirects = |
| + NavigationEntryImpl::FromNavigationEntry( |
| + controller.GetLastCommittedEntry()); |
| + ASSERT_EQ(1U, committed_entry_with_redirects->GetRedirectChain().size()); |
| + EXPECT_EQ(GURL("http://foo2"), |
| + committed_entry_with_redirects->GetRedirectChain()[0]); |
| } |
| // Tests what happens when we navigate back successfully |