Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: chrome/browser/sync/test/integration/enable_disable_test.cc

Issue 2738243002: [Sync] Enable Sync_integration_tests on chromeos (Closed)
Patch Set: add to main waterfall Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/single_client_printers_sync_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/macros.h" 5 #include "base/macros.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 "components/browser_sync/profile_sync_service.h" 8 #include "components/browser_sync/profile_sync_service.h"
9 #include "components/sync/base/model_type.h" 9 #include "components/sync/base/model_type.h"
10 #include "components/sync/base/sync_prefs.h" 10 #include "components/sync/base/sync_prefs.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 ModelTypeSet registered_types_; 151 ModelTypeSet registered_types_;
152 ModelTypeSet selectable_types_; 152 ModelTypeSet selectable_types_;
153 ModelTypeSet multi_grouped_types_; 153 ModelTypeSet multi_grouped_types_;
154 ModelTypeSet registered_directory_types_; 154 ModelTypeSet registered_directory_types_;
155 ModelTypeSet registered_selectable_types_; 155 ModelTypeSet registered_selectable_types_;
156 156
157 private: 157 private:
158 DISALLOW_COPY_AND_ASSIGN(EnableDisableSingleClientTest); 158 DISALLOW_COPY_AND_ASSIGN(EnableDisableSingleClientTest);
159 }; 159 };
160 160
161 IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, EnableOneAtATime) { 161 // crbug.com/689662
162 #if defined(OS_CHROMEOS)
163 #define MAYBE_EnableOneAtATime DISABLED_EnableOneAtATime
164 #else
165 #define MAYBE_EnableOneAtATime EnableOneAtATime
166 #endif
167 IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, MAYBE_EnableOneAtATime) {
162 // Setup sync with no enabled types. 168 // Setup sync with no enabled types.
163 SetupTest(false); 169 SetupTest(false);
164 170
165 for (ModelTypeSet::Iterator si = selectable_types_.First(); si.Good(); 171 for (ModelTypeSet::Iterator si = selectable_types_.First(); si.Good();
166 si.Inc()) { 172 si.Inc()) {
167 const ModelTypeSet grouped_types = ResolveGroup(si.Get()); 173 const ModelTypeSet grouped_types = ResolveGroup(si.Get());
168 const ModelTypeSet single_grouped_types = WithoutMultiTypes(grouped_types); 174 const ModelTypeSet single_grouped_types = WithoutMultiTypes(grouped_types);
169 for (ModelTypeSet::Iterator sgi = single_grouped_types.First(); sgi.Good(); 175 for (ModelTypeSet::Iterator sgi = single_grouped_types.First(); sgi.Good();
170 sgi.Inc()) { 176 sgi.Inc()) {
171 VerifyExistence(user_share_, false, sgi.Get(), si.Get()); 177 VerifyExistence(user_share_, false, sgi.Get(), si.Get());
172 } 178 }
173 179
174 EXPECT_TRUE(GetClient(0)->EnableSyncForDatatype(si.Get())); 180 EXPECT_TRUE(GetClient(0)->EnableSyncForDatatype(si.Get()));
175 181
176 for (ModelTypeSet::Iterator gi = grouped_types.First(); gi.Good(); 182 for (ModelTypeSet::Iterator gi = grouped_types.First(); gi.Good();
177 gi.Inc()) { 183 gi.Inc()) {
178 VerifyExistence(user_share_, true, gi.Get(), si.Get()); 184 VerifyExistence(user_share_, true, gi.Get(), si.Get());
179 } 185 }
180 } 186 }
181 } 187 }
182 188
183 IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, DisableOneAtATime) { 189 // crbug.com/689662
190 #if defined(OS_CHROMEOS)
191 #define MAYBE_DisableOneAtATime DISABLED_DisableOneAtATime
192 #else
193 #define MAYBE_DisableOneAtATime DisableOneAtATime
194 #endif
195 IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, MAYBE_DisableOneAtATime) {
184 // Setup sync with no disabled types. 196 // Setup sync with no disabled types.
185 SetupTest(true); 197 SetupTest(true);
186 198
187 // Make sure all top-level nodes exist first. 199 // Make sure all top-level nodes exist first.
188 for (ModelTypeSet::Iterator rdi = registered_directory_types_.First(); 200 for (ModelTypeSet::Iterator rdi = registered_directory_types_.First();
189 rdi.Good(); rdi.Inc()) { 201 rdi.Good(); rdi.Inc()) {
190 EXPECT_TRUE(DoesTopLevelNodeExist(user_share_, rdi.Get()) || 202 EXPECT_TRUE(DoesTopLevelNodeExist(user_share_, rdi.Get()) ||
191 IsUnready(data_type_status_table_, rdi.Get())) 203 IsUnready(data_type_status_table_, rdi.Get()))
192 << ModelTypeToString(rdi.Get()); 204 << ModelTypeToString(rdi.Get());
193 } 205 }
(...skipping 17 matching lines...) Expand all
211 223
212 // Lastly make sure that all the multi grouped times are all gone, since we 224 // Lastly make sure that all the multi grouped times are all gone, since we
213 // did not check these after disabling inside the above loop. 225 // did not check these after disabling inside the above loop.
214 for (ModelTypeSet::Iterator mgi = multi_grouped_types_.First(); mgi.Good(); 226 for (ModelTypeSet::Iterator mgi = multi_grouped_types_.First(); mgi.Good();
215 mgi.Inc()) { 227 mgi.Inc()) {
216 VerifyExistence(user_share_, false, mgi.Get()); 228 VerifyExistence(user_share_, false, mgi.Get());
217 } 229 }
218 } 230 }
219 231
220 } // namespace 232 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/single_client_printers_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698