Index: chrome/browser/sync/engine/syncapi_unittest.cc |
diff --git a/chrome/browser/sync/engine/syncapi_unittest.cc b/chrome/browser/sync/engine/syncapi_unittest.cc |
index f92d4a33eece7c72b251752217f82dff91c596be..b89e0de4b1892928ab0ca9dd4bfb70d0db81616e 100755 |
--- a/chrome/browser/sync/engine/syncapi_unittest.cc |
+++ b/chrome/browser/sync/engine/syncapi_unittest.cc |
@@ -8,7 +8,6 @@ |
#include "base/scoped_ptr.h" |
#include "base/scoped_temp_dir.h" |
-#include "base/string_util.h" |
#include "chrome/browser/sync/engine/syncapi.h" |
#include "chrome/browser/sync/syncable/directory_manager.h" |
#include "chrome/browser/sync/syncable/syncable.h" |
@@ -79,30 +78,20 @@ TEST_F(SyncApiTest, BasicTagWrite) { |
} |
} |
-namespace { |
-std::string HashToHex(const std::string& hash) { |
- return HexEncode(hash.data(), hash.length()); |
-} |
-} // namespace |
- |
-// TODO(chron): Finalize the hash format. Renable test. http://crbug.com/36827 |
-TEST_F(SyncApiTest, DISABLED_GenerateSyncableHash) { |
-/* |
- EXPECT_EQ("3B2697579984CEB3D2E306E8826B4ABD17DE9002", |
- HashToHex(BaseNode::GenerateSyncableHash(syncable::BOOKMARKS, "tag1"))); |
- EXPECT_EQ("88D150B511506FE219727D642942446430E42ECE", |
- HashToHex( |
- BaseNode::GenerateSyncableHash(syncable::PREFERENCES, "tag1"))); |
- EXPECT_EQ("80ED5C3D941768CEF7B073AF480FAD282285B39F", |
- HashToHex(BaseNode::GenerateSyncableHash(syncable::AUTOFILL, "tag1"))); |
- EXPECT_EQ("0347982075CCD7F8D5C0A0C3A75D94A76D0890A6", |
- HashToHex(BaseNode::GenerateSyncableHash(syncable::BOOKMARKS, "tag2"))); |
- EXPECT_EQ("5D8C6417B6E14B8788B52B45822388014DB7B302", |
- HashToHex( |
- BaseNode::GenerateSyncableHash(syncable::PREFERENCES, "tag2"))); |
- EXPECT_EQ("185896CE8E4D1A18CB94DF8EC827E1CB6F032534", |
- HashToHex(BaseNode::GenerateSyncableHash(syncable::AUTOFILL, "tag2"))); |
-*/ |
+TEST_F(SyncApiTest, GenerateSyncableHash) { |
+ EXPECT_EQ("OyaXV5mEzrPS4wbogmtKvRfekAI=", |
+ BaseNode::GenerateSyncableHash(syncable::BOOKMARKS, "tag1")); |
+ EXPECT_EQ("iNFQtRFQb+IZcn1kKUJEZDDkLs4=", |
+ BaseNode::GenerateSyncableHash(syncable::PREFERENCES, "tag1")); |
+ EXPECT_EQ("gO1cPZQXaM73sHOvSA+tKCKFs58=", |
+ BaseNode::GenerateSyncableHash(syncable::AUTOFILL, "tag1")); |
+ |
+ EXPECT_EQ("A0eYIHXM1/jVwKDDp12Up20IkKY=", |
+ BaseNode::GenerateSyncableHash(syncable::BOOKMARKS, "tag2")); |
+ EXPECT_EQ("XYxkF7bhS4eItStFgiOIAU23swI=", |
+ BaseNode::GenerateSyncableHash(syncable::PREFERENCES, "tag2")); |
+ EXPECT_EQ("GFiWzo5NGhjLlN+OyCfhy28DJTQ=", |
+ BaseNode::GenerateSyncableHash(syncable::AUTOFILL, "tag2")); |
} |
TEST_F(SyncApiTest, ModelTypesSiloed) { |