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 a55c778234b5d2ecdce8cc57b15a1430966ab19a..19ae747e8b2071a1c5c930ca1ed0f31ccae12709 100644 |
--- a/chrome/browser/sessions/session_restore_browsertest.cc |
+++ b/chrome/browser/sessions/session_restore_browsertest.cc |
@@ -258,9 +258,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) { |
GURL url1(ui_test_utils::GetTestUrl( |
FilePath(FilePath::kCurrentDirectory), |
FilePath(FILE_PATH_LITERAL("title1.html")))); |
- GURL url2(ui_test_utils::GetTestUrl( |
- FilePath(FilePath::kCurrentDirectory), |
- FilePath(FILE_PATH_LITERAL("title2.html")))); |
+ GURL url2("about:version"); |
GURL url3(ui_test_utils::GetTestUrl( |
FilePath(FilePath::kCurrentDirectory), |
FilePath(FILE_PATH_LITERAL("title3.html")))); |
@@ -300,17 +298,21 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) { |
// 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; |
// If this tab held url2, then restore this single tab. |
if (tab.navigations[0].virtual_url() == url2) { |
timestamp = SessionTypesTestHelper::GetTimestamp(tab.navigations[0]); |
+ http_status_code = |
+ SessionTypesTestHelper::GetHttpStatusCode(tab.navigations[0]); |
service->RestoreEntryById(NULL, tab.id, UNKNOWN); |
break; |
} |
} |
EXPECT_FALSE(timestamp.is_null()); |
+ EXPECT_EQ(200, http_status_code); |
// Make sure that the restored tab is removed from the service. |
ASSERT_EQ(1U, service->entries().size()); |
@@ -319,7 +321,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) { |
EXPECT_EQ(2U, window->tabs.size()); |
// Make sure that the restored tab was restored with the correct |
- // timestamp. |
+ // timestamp and status code. |
const content::WebContents* contents = |
chrome::GetActiveWebContents(browser()); |
ASSERT_TRUE(contents); |
@@ -327,6 +329,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) { |
contents->GetController().GetActiveEntry(); |
ASSERT_TRUE(entry); |
EXPECT_EQ(timestamp, entry->GetTimestamp()); |
+ EXPECT_EQ(http_status_code, entry->GetHttpStatusCode()); |
} |
IN_PROC_BROWSER_TEST_F(SessionRestoreTest, WindowWithOneTab) { |