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

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

Issue 11098002: [Sync] Add a new global_id field to sync_pb::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/sessions/session_types_unittest.cc
diff --git a/chrome/browser/sessions/session_types_unittest.cc b/chrome/browser/sessions/session_types_unittest.cc
index 168dc7605a35ba8e54a6d63fa037bbc4621848c8..f77c26e7df4b3587f9d5c3b5de57a22e4a328404 100644
--- a/chrome/browser/sessions/session_types_unittest.cc
+++ b/chrome/browser/sessions/session_types_unittest.cc
@@ -42,7 +42,7 @@ const bool kHasPostData = true;
const int64 kPostID = 100;
const GURL kOriginalRequestURL("http://www.original-request.com");
const bool kIsOverridingUserAgent = true;
-const base::Time kTimestamp = syncer::ProtoTimeToTime(100);
+const base::Time kTimestamp = base::Time::FromInternalValue(12345);
const int kPageID = 10;
@@ -73,7 +73,8 @@ sync_pb::TabNavigation MakeSyncDataForTest() {
sync_data.set_page_transition(
sync_pb::SyncEnums_PageTransition_AUTO_SUBFRAME);
sync_data.set_unique_id(kUniqueID);
- sync_data.set_timestamp(syncer::TimeToProtoTime(kTimestamp));
+ sync_data.set_timestamp_deprecated(syncer::TimeToProtoTime(kTimestamp));
+ sync_data.set_local_timestamp(kTimestamp.ToInternalValue());
sync_data.set_redirect_type(sync_pb::SyncEnums::CLIENT_REDIRECT);
sync_data.set_navigation_home_page(true);
return sync_data;
@@ -243,7 +244,10 @@ TEST(TabNavigationTest, ToSyncData) {
sync_data.page_transition());
EXPECT_TRUE(sync_data.has_redirect_type());
EXPECT_EQ(navigation_entry->GetUniqueID(), sync_data.unique_id());
- EXPECT_EQ(syncer::TimeToProtoTime(kTimestamp), sync_data.timestamp());
+ EXPECT_EQ(syncer::TimeToProtoTime(kTimestamp),
+ sync_data.timestamp_deprecated());
+ EXPECT_EQ(kTimestamp,
+ base::Time::FromInternalValue(sync_data.local_timestamp()));
}
// Ensure all transition types and qualifiers are converted to/from the sync

Powered by Google App Engine
This is Rietveld 408576698