Index: chrome/browser/sync/internal_api/syncapi_unittest.cc |
diff --git a/chrome/browser/sync/internal_api/syncapi_unittest.cc b/chrome/browser/sync/internal_api/syncapi_unittest.cc |
index 9f48680424eb58141c4e13712e15aeb5f1d0b9e2..7d1da461d3c5447fe2975ee8526940e5968ff99f 100644 |
--- a/chrome/browser/sync/internal_api/syncapi_unittest.cc |
+++ b/chrome/browser/sync/internal_api/syncapi_unittest.cc |
@@ -50,6 +50,7 @@ |
#include "chrome/browser/sync/syncable/syncable_id.h" |
#include "chrome/browser/sync/test/engine/test_user_share.h" |
#include "chrome/browser/sync/util/cryptographer.h" |
+#include "chrome/browser/sync/util/time.h" |
#include "chrome/test/base/values_test_util.h" |
#include "content/browser/browser_thread.h" |
#include "testing/gmock/include/gmock/gmock.h" |
@@ -96,6 +97,13 @@ void ExpectInt64Value(int64 expected_value, |
EXPECT_EQ(expected_value, val); |
} |
+void ExpectTimeValue(const base::Time& expected_value, |
+ const DictionaryValue& value, const std::string& key) { |
+ std::string time_str; |
+ EXPECT_TRUE(value.GetString(key, &time_str)); |
+ EXPECT_EQ(browser_sync::GetTimeDebugString(expected_value), time_str); |
+} |
+ |
// Makes a non-folder child of the root node. Returns the id of the |
// newly-created node. |
int64 MakeNode(UserShare* share, |
@@ -513,7 +521,7 @@ void CheckNodeValue(const BaseNode& node, const DictionaryValue& value, |
} |
if (is_detailed) { |
ExpectInt64Value(node.GetParentId(), value, "parentId"); |
- ExpectInt64Value(node.GetModificationTime(), value, "modificationTime"); |
+ ExpectTimeValue(node.GetModificationTime(), value, "modificationTime"); |
ExpectInt64Value(node.GetExternalId(), value, "externalId"); |
ExpectInt64Value(node.GetPredecessorId(), value, "predecessorId"); |
ExpectInt64Value(node.GetSuccessorId(), value, "successorId"); |