OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Unit tests for the SyncApi. Note that a lot of the underlying | 5 // Unit tests for the SyncApi. Note that a lot of the underlying |
6 // functionality is provided by the Syncable layer, which has its own | 6 // functionality is provided by the Syncable layer, which has its own |
7 // unit tests. We'll test SyncApi specific things in this harness. | 7 // unit tests. We'll test SyncApi specific things in this harness. |
8 | 8 |
9 #include <cstddef> | 9 #include <cstddef> |
10 #include <map> | 10 #include <map> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" | 42 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" |
43 #include "chrome/browser/sync/protocol/extension_specifics.pb.h" | 43 #include "chrome/browser/sync/protocol/extension_specifics.pb.h" |
44 #include "chrome/browser/sync/protocol/password_specifics.pb.h" | 44 #include "chrome/browser/sync/protocol/password_specifics.pb.h" |
45 #include "chrome/browser/sync/protocol/proto_value_conversions.h" | 45 #include "chrome/browser/sync/protocol/proto_value_conversions.h" |
46 #include "chrome/browser/sync/protocol/sync.pb.h" | 46 #include "chrome/browser/sync/protocol/sync.pb.h" |
47 #include "chrome/browser/sync/sessions/sync_session.h" | 47 #include "chrome/browser/sync/sessions/sync_session.h" |
48 #include "chrome/browser/sync/syncable/directory_manager.h" | 48 #include "chrome/browser/sync/syncable/directory_manager.h" |
49 #include "chrome/browser/sync/syncable/syncable.h" | 49 #include "chrome/browser/sync/syncable/syncable.h" |
50 #include "chrome/browser/sync/syncable/syncable_id.h" | 50 #include "chrome/browser/sync/syncable/syncable_id.h" |
51 #include "chrome/browser/sync/test/engine/test_user_share.h" | 51 #include "chrome/browser/sync/test/engine/test_user_share.h" |
52 #include "chrome/browser/sync/util/cryptographer.h" | 52 #include "chrome/browser/sync/encryption/cryptographer.h" |
53 #include "chrome/browser/sync/util/time.h" | 53 #include "chrome/browser/sync/util/time.h" |
54 #include "chrome/test/base/values_test_util.h" | 54 #include "chrome/test/base/values_test_util.h" |
55 #include "content/test/test_browser_thread.h" | 55 #include "content/test/test_browser_thread.h" |
56 #include "testing/gmock/include/gmock/gmock.h" | 56 #include "testing/gmock/include/gmock/gmock.h" |
57 #include "testing/gtest/include/gtest/gtest.h" | 57 #include "testing/gtest/include/gtest/gtest.h" |
58 | 58 |
59 using browser_sync::Cryptographer; | 59 using browser_sync::Cryptographer; |
60 using browser_sync::HasArgsAsList; | 60 using browser_sync::HasArgsAsList; |
61 using browser_sync::HasDetailsAsDictionary; | 61 using browser_sync::HasDetailsAsDictionary; |
62 using browser_sync::KeyParams; | 62 using browser_sync::KeyParams; |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1530 EXPECT_EQ(syncable::BOOKMARKS, node2.GetModelType()); | 1530 EXPECT_EQ(syncable::BOOKMARKS, node2.GetModelType()); |
1531 // We should de-canonicalize the title in GetTitle(), but the title in the | 1531 // We should de-canonicalize the title in GetTitle(), but the title in the |
1532 // specifics should be stored in the server legal form. | 1532 // specifics should be stored in the server legal form. |
1533 EXPECT_EQ(raw_title2, node2.GetTitle()); | 1533 EXPECT_EQ(raw_title2, node2.GetTitle()); |
1534 EXPECT_EQ(title2, node2.GetBookmarkSpecifics().title()); | 1534 EXPECT_EQ(title2, node2.GetBookmarkSpecifics().title()); |
1535 EXPECT_EQ(url2, node2.GetBookmarkSpecifics().url()); | 1535 EXPECT_EQ(url2, node2.GetBookmarkSpecifics().url()); |
1536 } | 1536 } |
1537 } | 1537 } |
1538 | 1538 |
1539 } // namespace browser_sync | 1539 } // namespace browser_sync |
OLD | NEW |