OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/sync/syncable/syncable.h" | 5 #include "chrome/browser/sync/syncable/syncable.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 TEST_F(SyncableDirectoryTest, TestCaseChangeRename) { | 826 TEST_F(SyncableDirectoryTest, TestCaseChangeRename) { |
827 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__); | 827 WriteTransaction trans(dir_.get(), UNITTEST, __FILE__, __LINE__); |
828 MutableEntry folder(&trans, CREATE, trans.root_id(), "CaseChange"); | 828 MutableEntry folder(&trans, CREATE, trans.root_id(), "CaseChange"); |
829 ASSERT_TRUE(folder.good()); | 829 ASSERT_TRUE(folder.good()); |
830 EXPECT_TRUE(folder.Put(PARENT_ID, trans.root_id())); | 830 EXPECT_TRUE(folder.Put(PARENT_ID, trans.root_id())); |
831 EXPECT_TRUE(folder.Put(NON_UNIQUE_NAME, "CASECHANGE")); | 831 EXPECT_TRUE(folder.Put(NON_UNIQUE_NAME, "CASECHANGE")); |
832 EXPECT_TRUE(folder.Put(IS_DEL, true)); | 832 EXPECT_TRUE(folder.Put(IS_DEL, true)); |
833 } | 833 } |
834 | 834 |
835 TEST_F(SyncableDirectoryTest, TestShareInfo) { | 835 TEST_F(SyncableDirectoryTest, TestShareInfo) { |
836 dir_->set_last_sync_timestamp(100); | 836 dir_->set_last_download_timestamp(100); |
837 dir_->set_store_birthday("Jan 31st"); | 837 dir_->set_store_birthday("Jan 31st"); |
838 { | 838 { |
839 ReadTransaction trans(dir_.get(), __FILE__, __LINE__); | 839 ReadTransaction trans(dir_.get(), __FILE__, __LINE__); |
840 EXPECT_EQ(100, dir_->last_sync_timestamp()); | 840 EXPECT_EQ(100, dir_->last_download_timestamp()); |
841 EXPECT_EQ("Jan 31st", dir_->store_birthday()); | 841 EXPECT_EQ("Jan 31st", dir_->store_birthday()); |
842 } | 842 } |
843 dir_->set_last_sync_timestamp(200); | 843 dir_->set_last_download_timestamp(200); |
844 dir_->set_store_birthday("April 10th"); | 844 dir_->set_store_birthday("April 10th"); |
845 dir_->SaveChanges(); | 845 dir_->SaveChanges(); |
846 { | 846 { |
847 ReadTransaction trans(dir_.get(), __FILE__, __LINE__); | 847 ReadTransaction trans(dir_.get(), __FILE__, __LINE__); |
848 EXPECT_EQ(200, dir_->last_sync_timestamp()); | 848 EXPECT_EQ(200, dir_->last_download_timestamp()); |
849 EXPECT_EQ("April 10th", dir_->store_birthday()); | 849 EXPECT_EQ("April 10th", dir_->store_birthday()); |
850 } | 850 } |
851 } | 851 } |
852 | 852 |
853 TEST_F(SyncableDirectoryTest, TestSimpleFieldsPreservedDuringSaveChanges) { | 853 TEST_F(SyncableDirectoryTest, TestSimpleFieldsPreservedDuringSaveChanges) { |
854 Id update_id = TestIdFactory::FromNumber(1); | 854 Id update_id = TestIdFactory::FromNumber(1); |
855 Id create_id; | 855 Id create_id; |
856 EntryKernel create_pre_save, update_pre_save; | 856 EntryKernel create_pre_save, update_pre_save; |
857 EntryKernel create_post_save, update_post_save; | 857 EntryKernel create_post_save, update_post_save; |
858 string create_name = "Create"; | 858 string create_name = "Create"; |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { | 1536 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { |
1537 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 1537 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
1538 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 1538 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
1539 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); | 1539 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); |
1540 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); | 1540 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); |
1541 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); | 1541 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); |
1542 } | 1542 } |
1543 | 1543 |
1544 } // namespace | 1544 } // namespace |
1545 } // namespace syncable | 1545 } // namespace syncable |
OLD | NEW |