Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Unified Diff: content/browser/frame_host/navigation_controller_impl_unittest.cc

Issue 2225343002: Navigation: move RestoreType and ReloadType into a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [rebase] Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 90e41e69872c7b3a834a57aa55467d43a7a14b98..c169123c497a5ec9fb4e1a2e912787716855e799 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -216,9 +216,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;
}
@@ -3023,16 +3022,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());
@@ -3071,7 +3067,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.
@@ -3095,8 +3091,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
@@ -3106,7 +3101,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());
@@ -3152,7 +3147,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());
}
@@ -4675,10 +4670,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();

Powered by Google App Engine
This is Rietveld 408576698