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

Side by Side Diff: components/sync/base/hash_util_unittest.cc

Issue 2662453008: [Sync] Fix sync lint errors/includes, update presubmit. (Closed)
Patch Set: Rebase Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « components/sync/PRESUBMIT.py ('k') | components/sync/base/sync_features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync/base/hash_util.h" 5 #include "components/sync/base/hash_util.h"
6 6
7 #include "components/sync/base/model_type.h"
8 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
9 8
10 namespace syncer { 9 namespace syncer {
11 10
12 // Tests that the hashing algorithm has not changed. 11 // Tests that the hashing algorithm has not changed.
13 TEST(SyncHashUtilTest, GenerateSyncableHash) { 12 TEST(SyncHashUtilTest, GenerateSyncableHash) {
14 EXPECT_EQ("OyaXV5mEzrPS4wbogmtKvRfekAI=", 13 EXPECT_EQ("OyaXV5mEzrPS4wbogmtKvRfekAI=",
15 GenerateSyncableHash(BOOKMARKS, "tag1")); 14 GenerateSyncableHash(BOOKMARKS, "tag1"));
16 EXPECT_EQ("iNFQtRFQb+IZcn1kKUJEZDDkLs4=", 15 EXPECT_EQ("iNFQtRFQb+IZcn1kKUJEZDDkLs4=",
17 GenerateSyncableHash(PREFERENCES, "tag1")); 16 GenerateSyncableHash(PREFERENCES, "tag1"));
18 EXPECT_EQ("gO1cPZQXaM73sHOvSA+tKCKFs58=", 17 EXPECT_EQ("gO1cPZQXaM73sHOvSA+tKCKFs58=",
19 GenerateSyncableHash(AUTOFILL, "tag1")); 18 GenerateSyncableHash(AUTOFILL, "tag1"));
20 19
21 EXPECT_EQ("A0eYIHXM1/jVwKDDp12Up20IkKY=", 20 EXPECT_EQ("A0eYIHXM1/jVwKDDp12Up20IkKY=",
22 GenerateSyncableHash(BOOKMARKS, "tag2")); 21 GenerateSyncableHash(BOOKMARKS, "tag2"));
23 EXPECT_EQ("XYxkF7bhS4eItStFgiOIAU23swI=", 22 EXPECT_EQ("XYxkF7bhS4eItStFgiOIAU23swI=",
24 GenerateSyncableHash(PREFERENCES, "tag2")); 23 GenerateSyncableHash(PREFERENCES, "tag2"));
25 EXPECT_EQ("GFiWzo5NGhjLlN+OyCfhy28DJTQ=", 24 EXPECT_EQ("GFiWzo5NGhjLlN+OyCfhy28DJTQ=",
26 GenerateSyncableHash(AUTOFILL, "tag2")); 25 GenerateSyncableHash(AUTOFILL, "tag2"));
27 } 26 }
28 27
29 } // namespace syncer 28 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/PRESUBMIT.py ('k') | components/sync/base/sync_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698