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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 6 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
7 #include "chrome/browser/sync/test/integration/sync_test.h" | 7 #include "chrome/browser/sync/test/integration/sync_test.h" |
8 #include "sync/internal_api/public/base/model_type.h" | 8 #include "sync/internal_api/public/base/model_type.h" |
9 #include "sync/internal_api/public/read_node.h" | 9 #include "sync/internal_api/public/read_node.h" |
10 #include "sync/internal_api/public/read_transaction.h" | 10 #include "sync/internal_api/public/read_transaction.h" |
11 | 11 |
12 // This file contains tests that exercise enabling and disabling data | 12 // This file contains tests that exercise enabling and disabling data |
13 // types. | 13 // types. |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 class EnableDisableSingleClientTest : public SyncTest { | 17 class EnableDisableSingleClientTest : public SyncTest { |
18 public: | 18 public: |
19 EnableDisableSingleClientTest() : SyncTest(SINGLE_CLIENT) {} | 19 EnableDisableSingleClientTest() : SyncTest(SINGLE_CLIENT) {} |
20 virtual ~EnableDisableSingleClientTest() {} | 20 ~EnableDisableSingleClientTest() override {} |
21 | 21 |
22 // Don't use self-notifications as they can trigger additional sync cycles. | 22 // Don't use self-notifications as they can trigger additional sync cycles. |
23 bool TestUsesSelfNotifications() override { return false; } | 23 bool TestUsesSelfNotifications() override { return false; } |
24 | 24 |
25 private: | 25 private: |
26 DISALLOW_COPY_AND_ASSIGN(EnableDisableSingleClientTest); | 26 DISALLOW_COPY_AND_ASSIGN(EnableDisableSingleClientTest); |
27 }; | 27 }; |
28 | 28 |
29 bool DoesTopLevelNodeExist(syncer::UserShare* user_share, | 29 bool DoesTopLevelNodeExist(syncer::UserShare* user_share, |
30 syncer::ModelType type) { | 30 syncer::ModelType type) { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 ASSERT_EQ(GetClient(0)->IsTypePreferred(syncer::TYPED_URLS), | 149 ASSERT_EQ(GetClient(0)->IsTypePreferred(syncer::TYPED_URLS), |
150 DoesTopLevelNodeExist(user_share, syncer::SESSIONS)); | 150 DoesTopLevelNodeExist(user_share, syncer::SESSIONS)); |
151 } else if (it.Get() == syncer::PREFERENCES) { | 151 } else if (it.Get() == syncer::PREFERENCES) { |
152 ASSERT_FALSE(DoesTopLevelNodeExist(user_share, | 152 ASSERT_FALSE(DoesTopLevelNodeExist(user_share, |
153 syncer::PRIORITY_PREFERENCES)); | 153 syncer::PRIORITY_PREFERENCES)); |
154 } | 154 } |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 } // namespace | 158 } // namespace |
OLD | NEW |