| 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 #include "chrome/browser/sync/syncable/syncable.h" | 5 #include "chrome/browser/sync/syncable/syncable.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 WriteTransaction trans(FROM_HERE, UNITTEST, dir_.get()); | 878 WriteTransaction trans(FROM_HERE, UNITTEST, dir_.get()); |
| 879 dir_->GetUnsyncedMetaHandles(&trans, &handles); | 879 dir_->GetUnsyncedMetaHandles(&trans, &handles); |
| 880 ASSERT_TRUE(1 == handles.size()); | 880 ASSERT_TRUE(1 == handles.size()); |
| 881 ASSERT_TRUE(handle2 == handles[0]); | 881 ASSERT_TRUE(handle2 == handles[0]); |
| 882 } | 882 } |
| 883 } | 883 } |
| 884 | 884 |
| 885 TEST_F(SyncableDirectoryTest, TestGetUnappliedUpdates) { | 885 TEST_F(SyncableDirectoryTest, TestGetUnappliedUpdates) { |
| 886 Directory::UnappliedUpdateMetaHandles handles; | 886 Directory::UnappliedUpdateMetaHandles handles; |
| 887 int64 handle1, handle2; | 887 int64 handle1, handle2; |
| 888 syncable::ModelTypeBitSet all_types; | 888 const syncable::FullModelEnumSet all_types = |
| 889 all_types.set(); | 889 syncable::FullModelEnumSet::All(); |
| 890 { | 890 { |
| 891 WriteTransaction trans(FROM_HERE, UNITTEST, dir_.get()); | 891 WriteTransaction trans(FROM_HERE, UNITTEST, dir_.get()); |
| 892 | 892 |
| 893 dir_->GetUnappliedUpdateMetaHandles(&trans, all_types, &handles); | 893 dir_->GetUnappliedUpdateMetaHandles(&trans, all_types, &handles); |
| 894 ASSERT_TRUE(0 == handles.size()); | 894 ASSERT_TRUE(0 == handles.size()); |
| 895 | 895 |
| 896 MutableEntry e1(&trans, CREATE, trans.root_id(), "abba"); | 896 MutableEntry e1(&trans, CREATE, trans.root_id(), "abba"); |
| 897 ASSERT_TRUE(e1.good()); | 897 ASSERT_TRUE(e1.good()); |
| 898 handle1 = e1.Get(META_HANDLE); | 898 handle1 = e1.Get(META_HANDLE); |
| 899 e1.Put(IS_UNAPPLIED_UPDATE, false); | 899 e1.Put(IS_UNAPPLIED_UPDATE, false); |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1897 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { | 1897 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { |
| 1898 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 1898 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
| 1899 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 1899 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
| 1900 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); | 1900 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); |
| 1901 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); | 1901 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); |
| 1902 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); | 1902 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); |
| 1903 } | 1903 } |
| 1904 | 1904 |
| 1905 } // namespace | 1905 } // namespace |
| 1906 } // namespace syncable | 1906 } // namespace syncable |
| OLD | NEW |