| 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 ca8034bbe636d9519d9f8a9fd2ecd0c183c3c7f1..0a07811ed3c5e8bfcaedadd518b44b7ca0ea29c6 100644
|
| --- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
|
| +++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
|
| @@ -211,9 +211,8 @@ class NavigationControllerTest
|
| }
|
|
|
| // WebContentsObserver:
|
| - void DidStartNavigationToPendingEntry(
|
| - const GURL& url,
|
| - NavigationController::ReloadType reload_type) override {
|
| + void DidStartNavigationToPendingEntry(const GURL& url,
|
| + ReloadType reload_type) override {
|
| navigated_url_ = url;
|
| }
|
|
|
| @@ -1973,7 +1972,7 @@ TEST_F(NavigationControllerTest, Redirect) {
|
| EXPECT_EQ(1U, navigation_entry_committed_counter_);
|
| navigation_entry_committed_counter_ = 0;
|
|
|
| - EXPECT_EQ(NAVIGATION_TYPE_SAME_PAGE, observer.details().type);
|
| + EXPECT_EQ(NavigationType::SAME_PAGE, observer.details().type);
|
| EXPECT_EQ(controller.GetEntryCount(), 1);
|
| EXPECT_EQ(controller.GetLastCommittedEntryIndex(), 0);
|
| EXPECT_TRUE(controller.GetLastCommittedEntry());
|
| @@ -2042,7 +2041,7 @@ TEST_F(NavigationControllerTest, PostThenRedirect) {
|
| EXPECT_EQ(1U, navigation_entry_committed_counter_);
|
| navigation_entry_committed_counter_ = 0;
|
|
|
| - EXPECT_EQ(NAVIGATION_TYPE_SAME_PAGE, observer.details().type);
|
| + EXPECT_EQ(NavigationType::SAME_PAGE, observer.details().type);
|
| EXPECT_EQ(controller.GetEntryCount(), 1);
|
| EXPECT_EQ(controller.GetLastCommittedEntryIndex(), 0);
|
| EXPECT_TRUE(controller.GetLastCommittedEntry());
|
| @@ -2094,7 +2093,7 @@ TEST_F(NavigationControllerTest, ImmediateRedirect) {
|
| EXPECT_EQ(1U, navigation_entry_committed_counter_);
|
| navigation_entry_committed_counter_ = 0;
|
|
|
| - EXPECT_EQ(NAVIGATION_TYPE_NEW_PAGE, observer.details().type);
|
| + EXPECT_EQ(NavigationType::NEW_PAGE, observer.details().type);
|
| EXPECT_EQ(controller.GetEntryCount(), 1);
|
| EXPECT_EQ(controller.GetLastCommittedEntryIndex(), 0);
|
| EXPECT_TRUE(controller.GetLastCommittedEntry());
|
| @@ -2155,7 +2154,7 @@ TEST_F(NavigationControllerTest,
|
|
|
| main_test_rfh()->PrepareForCommit();
|
| main_test_rfh()->SendNavigateWithParams(¶ms);
|
| - EXPECT_EQ(NAVIGATION_TYPE_EXISTING_PAGE, observer.details().type);
|
| + EXPECT_EQ(NavigationType::EXISTING_PAGE, observer.details().type);
|
| }
|
|
|
| // Tests navigation via link click within a subframe. A new navigation entry
|
| @@ -2974,16 +2973,13 @@ TEST_F(NavigationControllerTest, RestoreNavigate) {
|
| std::unique_ptr<WebContentsImpl> our_contents(static_cast<WebContentsImpl*>(
|
| WebContents::Create(WebContents::CreateParams(browser_context()))));
|
| NavigationControllerImpl& our_controller = our_contents->GetController();
|
| - our_controller.Restore(
|
| - 0,
|
| - NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY,
|
| - &entries);
|
| + our_controller.Restore(0, RestoreType::LAST_SESSION_EXITED_CLEANLY, &entries);
|
| ASSERT_EQ(0u, entries.size());
|
|
|
| // Before navigating to the restored entry, it should have a restore_type
|
| // and no SiteInstance.
|
| ASSERT_EQ(1, our_controller.GetEntryCount());
|
| - EXPECT_EQ(NavigationEntryImpl::RESTORE_LAST_SESSION_EXITED_CLEANLY,
|
| + EXPECT_EQ(RestoreType::LAST_SESSION_EXITED_CLEANLY,
|
| our_controller.GetEntryAtIndex(0)->restore_type());
|
| EXPECT_FALSE(our_controller.GetEntryAtIndex(0)->site_instance());
|
|
|
| @@ -3022,7 +3018,7 @@ TEST_F(NavigationControllerTest, RestoreNavigate) {
|
| EXPECT_EQ(
|
| url,
|
| our_controller.GetLastCommittedEntry()->site_instance()->GetSiteURL());
|
| - EXPECT_EQ(NavigationEntryImpl::RESTORE_NONE,
|
| + EXPECT_EQ(RestoreType::NONE,
|
| our_controller.GetEntryAtIndex(0)->restore_type());
|
|
|
| // Timestamp should have been updated.
|
| @@ -3046,8 +3042,7 @@ TEST_F(NavigationControllerTest, RestoreNavigateAfterFailure) {
|
| std::unique_ptr<WebContentsImpl> our_contents(static_cast<WebContentsImpl*>(
|
| WebContents::Create(WebContents::CreateParams(browser_context()))));
|
| NavigationControllerImpl& our_controller = our_contents->GetController();
|
| - our_controller.Restore(
|
| - 0, NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY, &entries);
|
| + our_controller.Restore(0, RestoreType::LAST_SESSION_EXITED_CLEANLY, &entries);
|
| ASSERT_EQ(0u, entries.size());
|
|
|
| // Ensure the RenderFrame is initialized before simulating events coming from
|
| @@ -3057,7 +3052,7 @@ TEST_F(NavigationControllerTest, RestoreNavigateAfterFailure) {
|
| // Before navigating to the restored entry, it should have a restore_type
|
| // and no SiteInstance.
|
| NavigationEntry* entry = our_controller.GetEntryAtIndex(0);
|
| - EXPECT_EQ(NavigationEntryImpl::RESTORE_LAST_SESSION_EXITED_CLEANLY,
|
| + EXPECT_EQ(RestoreType::LAST_SESSION_EXITED_CLEANLY,
|
| our_controller.GetEntryAtIndex(0)->restore_type());
|
| EXPECT_FALSE(our_controller.GetEntryAtIndex(0)->site_instance());
|
|
|
| @@ -3103,7 +3098,7 @@ TEST_F(NavigationControllerTest, RestoreNavigateAfterFailure) {
|
| EXPECT_EQ(
|
| url,
|
| our_controller.GetLastCommittedEntry()->site_instance()->GetSiteURL());
|
| - EXPECT_EQ(NavigationEntryImpl::RESTORE_NONE,
|
| + EXPECT_EQ(RestoreType::NONE,
|
| our_controller.GetEntryAtIndex(0)->restore_type());
|
| }
|
|
|
| @@ -4626,10 +4621,8 @@ TEST_F(NavigationControllerTest, CopyRestoredStateAndNavigate) {
|
| static_cast<TestWebContents*>(CreateTestWebContents()));
|
| NavigationControllerImpl& source_controller =
|
| source_contents->GetController();
|
| - source_controller.Restore(
|
| - entries.size() - 1,
|
| - NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY,
|
| - &entries);
|
| + source_controller.Restore(entries.size() - 1,
|
| + RestoreType::LAST_SESSION_EXITED_CLEANLY, &entries);
|
| ASSERT_EQ(0u, entries.size());
|
| source_controller.LoadIfNecessary();
|
| source_contents->CommitPendingNavigation();
|
| @@ -5186,7 +5179,7 @@ TEST_F(NavigationControllerTest, UnreachableURLGivesErrorPage) {
|
| main_test_rfh()->SendNavigateWithParams(¶ms);
|
| EXPECT_EQ(PAGE_TYPE_ERROR,
|
| controller_impl().GetLastCommittedEntry()->GetPageType());
|
| - EXPECT_EQ(NAVIGATION_TYPE_NEW_PAGE, observer.details().type);
|
| + EXPECT_EQ(NavigationType::NEW_PAGE, observer.details().type);
|
| }
|
|
|
| // Navigate to existing page.
|
| @@ -5198,7 +5191,7 @@ TEST_F(NavigationControllerTest, UnreachableURLGivesErrorPage) {
|
| main_test_rfh()->SendNavigateWithParams(¶ms);
|
| EXPECT_EQ(PAGE_TYPE_ERROR,
|
| controller_impl().GetLastCommittedEntry()->GetPageType());
|
| - EXPECT_EQ(NAVIGATION_TYPE_EXISTING_PAGE, observer.details().type);
|
| + EXPECT_EQ(NavigationType::EXISTING_PAGE, observer.details().type);
|
| }
|
|
|
| // Navigate to same page.
|
| @@ -5214,7 +5207,7 @@ TEST_F(NavigationControllerTest, UnreachableURLGivesErrorPage) {
|
| main_test_rfh()->SendNavigateWithParams(¶ms);
|
| EXPECT_EQ(PAGE_TYPE_ERROR,
|
| controller_impl().GetLastCommittedEntry()->GetPageType());
|
| - EXPECT_EQ(NAVIGATION_TYPE_SAME_PAGE, observer.details().type);
|
| + EXPECT_EQ(NavigationType::SAME_PAGE, observer.details().type);
|
| }
|
|
|
| // Navigate in page.
|
|
|