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

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

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "chrome/browser/sync/profile_sync_service_harness.h" 6 #include "chrome/browser/sync/profile_sync_service_harness.h"
7 #include "chrome/browser/sync/test/integration/sync_test.h"
7 #include "chrome/browser/sync/test/integration/themes_helper.h" 8 #include "chrome/browser/sync/test/integration/themes_helper.h"
8 #include "chrome/browser/sync/test/integration/sync_test.h"
9 9
10 using themes_helper::GetCustomTheme; 10 using themes_helper::GetCustomTheme;
11 using themes_helper::GetThemeID; 11 using themes_helper::GetThemeID;
12 using themes_helper::HasOrWillHaveCustomTheme; 12 using themes_helper::HasOrWillHaveCustomTheme;
13 using themes_helper::ThemeIsPendingInstall; 13 using themes_helper::ThemeIsPendingInstall;
14 using themes_helper::UseCustomTheme; 14 using themes_helper::UseCustomTheme;
15 using themes_helper::UseDefaultTheme; 15 using themes_helper::UseDefaultTheme;
16 using themes_helper::UseNativeTheme; 16 using themes_helper::UseNativeTheme;
17 using themes_helper::UsingCustomTheme; 17 using themes_helper::UsingCustomTheme;
18 using themes_helper::UsingDefaultTheme; 18 using themes_helper::UsingDefaultTheme;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 // TCM ID - 3723272. 194 // TCM ID - 3723272.
195 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DisableThemes) { 195 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DisableThemes) {
196 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 196 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
197 197
198 ASSERT_FALSE(UsingCustomTheme(GetProfile(0))); 198 ASSERT_FALSE(UsingCustomTheme(GetProfile(0)));
199 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); 199 ASSERT_FALSE(UsingCustomTheme(GetProfile(1)));
200 ASSERT_FALSE(UsingCustomTheme(verifier())); 200 ASSERT_FALSE(UsingCustomTheme(verifier()));
201 201
202 ASSERT_TRUE(GetClient(1)->DisableSyncForDatatype(syncable::THEMES)); 202 ASSERT_TRUE(GetClient(1)->DisableSyncForDatatype(syncer::THEMES));
203 UseCustomTheme(GetProfile(0), 0); 203 UseCustomTheme(GetProfile(0), 0);
204 UseCustomTheme(verifier(), 0); 204 UseCustomTheme(verifier(), 0);
205 ASSERT_TRUE(AwaitQuiescence()); 205 ASSERT_TRUE(AwaitQuiescence());
206 206
207 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0))); 207 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0)));
208 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); 208 ASSERT_FALSE(UsingCustomTheme(GetProfile(1)));
209 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); 209 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier()));
210 210
211 ASSERT_TRUE(GetClient(1)->EnableSyncForDatatype(syncable::THEMES)); 211 ASSERT_TRUE(GetClient(1)->EnableSyncForDatatype(syncer::THEMES));
212 ASSERT_TRUE(AwaitQuiescence()); 212 ASSERT_TRUE(AwaitQuiescence());
213 213
214 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0))); 214 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0)));
215 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); 215 ASSERT_FALSE(UsingCustomTheme(GetProfile(1)));
216 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0))); 216 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0)));
217 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); 217 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier()));
218 } 218 }
219 219
220 // TCM ID - 3687288. 220 // TCM ID - 3687288.
221 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DisableSync) { 221 IN_PROC_BROWSER_TEST_F(TwoClientThemesSyncTest, DisableSync) {
(...skipping 14 matching lines...) Expand all
236 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); 236 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier()));
237 237
238 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); 238 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes());
239 ASSERT_TRUE(AwaitQuiescence()); 239 ASSERT_TRUE(AwaitQuiescence());
240 240
241 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0))); 241 ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0)));
242 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier())); 242 ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier()));
243 ASSERT_FALSE(UsingCustomTheme(GetProfile(1))); 243 ASSERT_FALSE(UsingCustomTheme(GetProfile(1)));
244 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0))); 244 ASSERT_TRUE(ThemeIsPendingInstall(GetProfile(1), GetCustomTheme(0)));
245 } 245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698