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

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: 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 af9bae7ffb06cee3b0f350082705677785b51631..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()));
@@ -608,9 +611,21 @@ TEST_F(SyncSessionModelAssociatorTest, SetSessionTabFromDelegate) {
session_tab.navigations[1].virtual_url());
EXPECT_EQ(entry3->GetVirtualURL(),
session_tab.navigations[2].virtual_url());
- EXPECT_EQ(kTime1, session_tab.navigations[0].timestamp());
- EXPECT_EQ(kTime2, session_tab.navigations[1].timestamp());
- EXPECT_EQ(kTime3, session_tab.navigations[2].timestamp());
+ EXPECT_EQ(kTime1,
+ SessionTypesTestHelper::GetTimestamp(session_tab.navigations[0]));
+ EXPECT_EQ(kTime2,
+ 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