| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <memory> | 5 #include <memory> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/test/values_test_util.h" | 9 #include "base/test/values_test_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 EXPECT_EQ(model_types, ModelTypeSetFromValue(*value)); | 62 EXPECT_EQ(model_types, ModelTypeSetFromValue(*value)); |
| 63 } | 63 } |
| 64 | 64 |
| 65 TEST_F(ModelTypeTest, IsRealDataType) { | 65 TEST_F(ModelTypeTest, IsRealDataType) { |
| 66 EXPECT_FALSE(IsRealDataType(UNSPECIFIED)); | 66 EXPECT_FALSE(IsRealDataType(UNSPECIFIED)); |
| 67 EXPECT_FALSE(IsRealDataType(MODEL_TYPE_COUNT)); | 67 EXPECT_FALSE(IsRealDataType(MODEL_TYPE_COUNT)); |
| 68 EXPECT_FALSE(IsRealDataType(TOP_LEVEL_FOLDER)); | 68 EXPECT_FALSE(IsRealDataType(TOP_LEVEL_FOLDER)); |
| 69 EXPECT_TRUE(IsRealDataType(FIRST_REAL_MODEL_TYPE)); | 69 EXPECT_TRUE(IsRealDataType(FIRST_REAL_MODEL_TYPE)); |
| 70 EXPECT_TRUE(IsRealDataType(BOOKMARKS)); | 70 EXPECT_TRUE(IsRealDataType(BOOKMARKS)); |
| 71 EXPECT_TRUE(IsRealDataType(APPS)); | 71 EXPECT_TRUE(IsRealDataType(APPS)); |
| 72 EXPECT_TRUE(IsRealDataType(ARC_PACKAGE)); |
| 72 } | 73 } |
| 73 | 74 |
| 74 TEST_F(ModelTypeTest, IsProxyType) { | 75 TEST_F(ModelTypeTest, IsProxyType) { |
| 75 EXPECT_FALSE(IsProxyType(BOOKMARKS)); | 76 EXPECT_FALSE(IsProxyType(BOOKMARKS)); |
| 76 EXPECT_FALSE(IsProxyType(MODEL_TYPE_COUNT)); | 77 EXPECT_FALSE(IsProxyType(MODEL_TYPE_COUNT)); |
| 77 EXPECT_TRUE(IsProxyType(PROXY_TABS)); | 78 EXPECT_TRUE(IsProxyType(PROXY_TABS)); |
| 78 } | 79 } |
| 79 | 80 |
| 80 // Make sure we can convert ModelTypes to and from specifics field | 81 // Make sure we can convert ModelTypes to and from specifics field |
| 81 // numbers. | 82 // numbers. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 EXPECT_EQ(notified_model_type, model_type); | 184 EXPECT_EQ(notified_model_type, model_type); |
| 184 } else { | 185 } else { |
| 185 EXPECT_FALSE(ProtocolTypes().Has(model_type)); | 186 EXPECT_FALSE(ProtocolTypes().Has(model_type)); |
| 186 EXPECT_TRUE(notification_type.empty()); | 187 EXPECT_TRUE(notification_type.empty()); |
| 187 } | 188 } |
| 188 } | 189 } |
| 189 } | 190 } |
| 190 | 191 |
| 191 } // namespace | 192 } // namespace |
| 192 } // namespace syncer | 193 } // namespace syncer |
| OLD | NEW |