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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 public: | 185 public: |
186 virtual void SetUp() { | 186 virtual void SetUp() { |
187 test_user_share_.SetUp(); | 187 test_user_share_.SetUp(); |
188 } | 188 } |
189 | 189 |
190 virtual void TearDown() { | 190 virtual void TearDown() { |
191 test_user_share_.TearDown(); | 191 test_user_share_.TearDown(); |
192 } | 192 } |
193 | 193 |
194 protected: | 194 protected: |
| 195 MessageLoop message_loop_; |
195 browser_sync::TestUserShare test_user_share_; | 196 browser_sync::TestUserShare test_user_share_; |
196 }; | 197 }; |
197 | 198 |
198 TEST_F(SyncApiTest, SanityCheckTest) { | 199 TEST_F(SyncApiTest, SanityCheckTest) { |
199 { | 200 { |
200 ReadTransaction trans(FROM_HERE, test_user_share_.user_share()); | 201 ReadTransaction trans(FROM_HERE, test_user_share_.user_share()); |
201 EXPECT_TRUE(trans.GetWrappedTrans() != NULL); | 202 EXPECT_TRUE(trans.GetWrappedTrans() != NULL); |
202 } | 203 } |
203 { | 204 { |
204 WriteTransaction trans(FROM_HERE, test_user_share_.user_share()); | 205 WriteTransaction trans(FROM_HERE, test_user_share_.user_share()); |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1530 EXPECT_EQ(syncable::BOOKMARKS, node2.GetModelType()); | 1531 EXPECT_EQ(syncable::BOOKMARKS, node2.GetModelType()); |
1531 // We should de-canonicalize the title in GetTitle(), but the title in the | 1532 // We should de-canonicalize the title in GetTitle(), but the title in the |
1532 // specifics should be stored in the server legal form. | 1533 // specifics should be stored in the server legal form. |
1533 EXPECT_EQ(raw_title2, node2.GetTitle()); | 1534 EXPECT_EQ(raw_title2, node2.GetTitle()); |
1534 EXPECT_EQ(title2, node2.GetBookmarkSpecifics().title()); | 1535 EXPECT_EQ(title2, node2.GetBookmarkSpecifics().title()); |
1535 EXPECT_EQ(url2, node2.GetBookmarkSpecifics().url()); | 1536 EXPECT_EQ(url2, node2.GetBookmarkSpecifics().url()); |
1536 } | 1537 } |
1537 } | 1538 } |
1538 | 1539 |
1539 } // namespace browser_sync | 1540 } // namespace browser_sync |
OLD | NEW |