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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 EXPECT_TRUE(folder.Put(NON_UNIQUE_NAME, "CASECHANGE")); | 1220 EXPECT_TRUE(folder.Put(NON_UNIQUE_NAME, "CASECHANGE")); |
1221 EXPECT_TRUE(folder.Put(IS_DEL, true)); | 1221 EXPECT_TRUE(folder.Put(IS_DEL, true)); |
1222 } | 1222 } |
1223 | 1223 |
1224 // Create items of each model type, and check that GetModelType and | 1224 // Create items of each model type, and check that GetModelType and |
1225 // GetServerModelType return the right value. | 1225 // GetServerModelType return the right value. |
1226 TEST_F(SyncableDirectoryTest, GetModelType) { | 1226 TEST_F(SyncableDirectoryTest, GetModelType) { |
1227 TestIdFactory id_factory; | 1227 TestIdFactory id_factory; |
1228 for (int i = 0; i < MODEL_TYPE_COUNT; ++i) { | 1228 for (int i = 0; i < MODEL_TYPE_COUNT; ++i) { |
1229 ModelType datatype = ModelTypeFromInt(i); | 1229 ModelType datatype = ModelTypeFromInt(i); |
| 1230 if (VirtualTypes().Has(datatype)) |
| 1231 continue; |
1230 SCOPED_TRACE(testing::Message("Testing model type ") << datatype); | 1232 SCOPED_TRACE(testing::Message("Testing model type ") << datatype); |
1231 switch (datatype) { | 1233 switch (datatype) { |
1232 case UNSPECIFIED: | 1234 case UNSPECIFIED: |
1233 case TOP_LEVEL_FOLDER: | 1235 case TOP_LEVEL_FOLDER: |
1234 continue; // Datatype isn't a function of Specifics. | 1236 continue; // Datatype isn't a function of Specifics. |
1235 default: | 1237 default: |
1236 break; | 1238 break; |
1237 } | 1239 } |
1238 sync_pb::EntitySpecifics specifics; | 1240 sync_pb::EntitySpecifics specifics; |
1239 AddDefaultFieldValue(datatype, &specifics); | 1241 AddDefaultFieldValue(datatype, &specifics); |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2260 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 2262 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
2261 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 2263 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
2262 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); | 2264 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); |
2263 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); | 2265 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); |
2264 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); | 2266 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); |
2265 } | 2267 } |
2266 | 2268 |
2267 } // namespace | 2269 } // namespace |
2268 } // namespace syncable | 2270 } // namespace syncable |
2269 } // namespace syncer | 2271 } // namespace syncer |
OLD | NEW |