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

Unified Diff: chrome/browser/sync/glue/session_model_associator_unittest.cc

Issue 11054025: [Sync] Add HTTP status codes to NavigationEntry and TabNavigation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto 11096037 Created 8 years, 2 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/sync/glue/session_model_associator_unittest.cc
diff --git a/chrome/browser/sync/glue/session_model_associator_unittest.cc b/chrome/browser/sync/glue/session_model_associator_unittest.cc
index 29c439374a8d35109c71336f2a0f4d31ef23c7b5..7f74463ec54fa5ebc87b94c541e7b1eaae363ee0 100644
--- a/chrome/browser/sync/glue/session_model_associator_unittest.cc
+++ b/chrome/browser/sync/glue/session_model_associator_unittest.cc
@@ -560,14 +560,17 @@ TEST_F(SyncSessionModelAssociatorTest, SetSessionTabFromDelegate) {
content::NavigationEntry::Create());
entry1->SetVirtualURL(GURL("http://www.google.com"));
entry1->SetTimestamp(kTime1);
+ entry1->SetHttpStatusCode(200);
scoped_ptr<content::NavigationEntry> entry2(
content::NavigationEntry::Create());
entry2->SetVirtualURL(GURL("http://www.noodle.com"));
entry2->SetTimestamp(kTime2);
+ entry2->SetHttpStatusCode(201);
scoped_ptr<content::NavigationEntry> entry3(
content::NavigationEntry::Create());
entry3->SetVirtualURL(GURL("http://www.doodle.com"));
entry3->SetTimestamp(kTime3);
+ entry3->SetHttpStatusCode(202);
EXPECT_CALL(tab_mock, GetCurrentEntryIndex()).WillRepeatedly(Return(2));
EXPECT_CALL(tab_mock, GetEntryAtIndex(0)).WillRepeatedly(
Return(entry1.get()));
@@ -614,6 +617,15 @@ TEST_F(SyncSessionModelAssociatorTest, SetSessionTabFromDelegate) {
SessionTypesTestHelper::GetTimestamp(session_tab.navigations[1]));
EXPECT_EQ(kTime3,
SessionTypesTestHelper::GetTimestamp(session_tab.navigations[2]));
+ EXPECT_EQ(200,
+ SessionTypesTestHelper::GetHttpStatusCode(
+ session_tab.navigations[0]));
+ EXPECT_EQ(201,
+ SessionTypesTestHelper::GetHttpStatusCode(
+ session_tab.navigations[1]));
+ EXPECT_EQ(202,
+ SessionTypesTestHelper::GetHttpStatusCode(
+ session_tab.navigations[2]));
EXPECT_TRUE(session_tab.session_storage_persistent_id.empty());
}

Powered by Google App Engine
This is Rietveld 408576698