OLD | NEW |
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 // Syncer unit tests. Unfortunately a lot of these tests | 5 // Syncer unit tests. Unfortunately a lot of these tests |
6 // are outdated and need to be reworked and updated. | 6 // are outdated and need to be reworked and updated. |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <limits> | 9 #include <limits> |
10 #include <list> | 10 #include <list> |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 } | 530 } |
531 | 531 |
532 bool Get(int64 metahandle, syncable::BitField field) { | 532 bool Get(int64 metahandle, syncable::BitField field) { |
533 return GetField(metahandle, field, false); | 533 return GetField(metahandle, field, false); |
534 } | 534 } |
535 | 535 |
536 Cryptographer* GetCryptographer(syncable::BaseTransaction* trans) { | 536 Cryptographer* GetCryptographer(syncable::BaseTransaction* trans) { |
537 return directory()->GetCryptographer(trans); | 537 return directory()->GetCryptographer(trans); |
538 } | 538 } |
539 | 539 |
540 MessageLoop message_loop_; | 540 base::MessageLoop message_loop_; |
541 | 541 |
542 // Some ids to aid tests. Only the root one's value is specific. The rest | 542 // Some ids to aid tests. Only the root one's value is specific. The rest |
543 // are named for test clarity. | 543 // are named for test clarity. |
544 // TODO(chron): Get rid of these inbuilt IDs. They only make it | 544 // TODO(chron): Get rid of these inbuilt IDs. They only make it |
545 // more confusing. | 545 // more confusing. |
546 syncable::Id root_id_; | 546 syncable::Id root_id_; |
547 syncable::Id parent_id_; | 547 syncable::Id parent_id_; |
548 syncable::Id child_id_; | 548 syncable::Id child_id_; |
549 | 549 |
550 TestIdFactory ids_; | 550 TestIdFactory ids_; |
(...skipping 4241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4792 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); | 4792 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); |
4793 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); | 4793 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); |
4794 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); | 4794 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); |
4795 } else { | 4795 } else { |
4796 EXPECT_TRUE(final_monitor_records.empty()) | 4796 EXPECT_TRUE(final_monitor_records.empty()) |
4797 << "Should not restore records after successful bookmark commit."; | 4797 << "Should not restore records after successful bookmark commit."; |
4798 } | 4798 } |
4799 } | 4799 } |
4800 | 4800 |
4801 } // namespace syncer | 4801 } // namespace syncer |
OLD | NEW |