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

Unified Diff: chrome/browser/sessions/session_restore_browsertest.cc

Issue 1350653004: [sessions] Properly namespace recently-componentized TabRestore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac Created 5 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: chrome/browser/sessions/session_restore_browsertest.cc
diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc
index fbe2ce01f5cb4034c2578bdba0a670e35eaddf96..0fd76b9c67c2ac6cc3c61a75353706ed232bf7ce 100644
--- a/chrome/browser/sessions/session_restore_browsertest.cc
+++ b/chrome/browser/sessions/session_restore_browsertest.cc
@@ -505,7 +505,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) {
observer.Wait();
}
- TabRestoreService* service =
+ sessions::TabRestoreService* service =
TabRestoreServiceFactory::GetForProfile(browser()->profile());
service->ClearEntries();
@@ -515,18 +515,21 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) {
// Expect a window with three tabs.
ASSERT_EQ(1U, service->entries().size());
- ASSERT_EQ(TabRestoreService::WINDOW, service->entries().front()->type);
- const TabRestoreService::Window* window =
- static_cast<TabRestoreService::Window*>(service->entries().front());
+ ASSERT_EQ(sessions::TabRestoreService::WINDOW,
+ service->entries().front()->type);
+ const sessions::TabRestoreService::Window* window =
+ static_cast<sessions::TabRestoreService::Window*>(
+ service->entries().front());
EXPECT_EQ(3U, window->tabs.size());
// Find the SessionID for entry2. Since the session service was destroyed,
// there is no guarantee that the SessionID for the tab has remained the same.
base::Time timestamp;
int http_status_code = 0;
- for (std::vector<TabRestoreService::Tab>::const_iterator it =
- window->tabs.begin(); it != window->tabs.end(); ++it) {
- const TabRestoreService::Tab& tab = *it;
+ for (std::vector<sessions::TabRestoreService::Tab>::const_iterator it =
+ window->tabs.begin();
+ it != window->tabs.end(); ++it) {
+ const sessions::TabRestoreService::Tab& tab = *it;
// If this tab held url2, then restore this single tab.
if (tab.navigations[0].virtual_url() == url2) {
timestamp = tab.navigations[0].timestamp();
@@ -546,8 +549,10 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) {
// Make sure that the restored tab is removed from the service.
ASSERT_EQ(1U, service->entries().size());
- ASSERT_EQ(TabRestoreService::WINDOW, service->entries().front()->type);
- window = static_cast<TabRestoreService::Window*>(service->entries().front());
+ ASSERT_EQ(sessions::TabRestoreService::WINDOW,
+ service->entries().front()->type);
+ window = static_cast<sessions::TabRestoreService::Window*>(
+ service->entries().front());
EXPECT_EQ(2U, window->tabs.size());
// Make sure that the restored tab was restored with the correct
@@ -570,7 +575,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, WindowWithOneTab) {
// Add a single tab.
ui_test_utils::NavigateToURL(browser(), url);
- TabRestoreService* service =
+ sessions::TabRestoreService* service =
TabRestoreServiceFactory::GetForProfile(browser()->profile());
service->ClearEntries();
EXPECT_EQ(0U, service->entries().size());
@@ -582,9 +587,10 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, WindowWithOneTab) {
// Expect the window to be converted to a tab by the TRS.
EXPECT_EQ(1U, service->entries().size());
- ASSERT_EQ(TabRestoreService::TAB, service->entries().front()->type);
- const TabRestoreService::Tab* tab =
- static_cast<TabRestoreService::Tab*>(service->entries().front());
+ ASSERT_EQ(sessions::TabRestoreService::TAB, service->entries().front()->type);
+ const sessions::TabRestoreService::Tab* tab =
+ static_cast<sessions::TabRestoreService::Tab*>(
+ service->entries().front());
// Restore the tab.
std::vector<sessions::LiveTab*> content =
« no previous file with comments | « chrome/browser/sessions/persistent_tab_restore_service_unittest.cc ('k') | chrome/browser/sessions/session_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698