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

Side by Side Diff: chrome/browser/sync/test/integration/two_client_apps_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) 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "chrome/common/extensions/extension_constants.h"
7 #include "chrome/browser/extensions/extension_service.h" 6 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_sorting.h" 7 #include "chrome/browser/extensions/extension_sorting.h"
9 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sync/profile_sync_service_harness.h" 9 #include "chrome/browser/sync/profile_sync_service_harness.h"
11 #include "chrome/browser/sync/test/integration/apps_helper.h" 10 #include "chrome/browser/sync/test/integration/apps_helper.h"
12 #include "chrome/browser/sync/test/integration/sync_app_helper.h" 11 #include "chrome/browser/sync/test/integration/sync_app_helper.h"
13 #include "chrome/browser/sync/test/integration/sync_test.h" 12 #include "chrome/browser/sync/test/integration/sync_test.h"
13 #include "chrome/common/extensions/extension_constants.h"
14 14
15 using apps_helper::AllProfilesHaveSameAppsAsVerifier; 15 using apps_helper::AllProfilesHaveSameAppsAsVerifier;
16 using apps_helper::CopyNTPOrdinals; 16 using apps_helper::CopyNTPOrdinals;
17 using apps_helper::DisableApp; 17 using apps_helper::DisableApp;
18 using apps_helper::EnableApp; 18 using apps_helper::EnableApp;
19 using apps_helper::FixNTPOrdinalCollisions; 19 using apps_helper::FixNTPOrdinalCollisions;
20 using apps_helper::HasSameAppsAsVerifier; 20 using apps_helper::HasSameAppsAsVerifier;
21 using apps_helper::IncognitoDisableApp; 21 using apps_helper::IncognitoDisableApp;
22 using apps_helper::IncognitoEnableApp; 22 using apps_helper::IncognitoEnableApp;
23 using apps_helper::InstallApp; 23 using apps_helper::InstallApp;
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 ASSERT_TRUE(AwaitQuiescence()); 286 ASSERT_TRUE(AwaitQuiescence());
287 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); 287 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
288 } 288 }
289 289
290 // TCM ID - 3718276. 290 // TCM ID - 3718276.
291 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, DisableApps) { 291 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, DisableApps) {
292 ASSERT_TRUE(SetupSync()); 292 ASSERT_TRUE(SetupSync());
293 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); 293 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
294 294
295 ASSERT_TRUE(GetClient(1)->DisableSyncForDatatype(syncable::APPS)); 295 ASSERT_TRUE(GetClient(1)->DisableSyncForDatatype(syncer::APPS));
296 InstallApp(GetProfile(0), 0); 296 InstallApp(GetProfile(0), 0);
297 InstallApp(verifier(), 0); 297 InstallApp(verifier(), 0);
298 ASSERT_TRUE(AwaitQuiescence()); 298 ASSERT_TRUE(AwaitQuiescence());
299 ASSERT_TRUE(HasSameAppsAsVerifier(0)); 299 ASSERT_TRUE(HasSameAppsAsVerifier(0));
300 ASSERT_FALSE(HasSameAppsAsVerifier(1)); 300 ASSERT_FALSE(HasSameAppsAsVerifier(1));
301 301
302 ASSERT_TRUE(GetClient(1)->EnableSyncForDatatype(syncable::APPS)); 302 ASSERT_TRUE(GetClient(1)->EnableSyncForDatatype(syncer::APPS));
303 ASSERT_TRUE(AwaitQuiescence()); 303 ASSERT_TRUE(AwaitQuiescence());
304 304
305 InstallAppsPendingForSync(GetProfile(0)); 305 InstallAppsPendingForSync(GetProfile(0));
306 InstallAppsPendingForSync(GetProfile(1)); 306 InstallAppsPendingForSync(GetProfile(1));
307 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); 307 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
308 } 308 }
309 309
310 // Disable sync for the second client and then install an app on the first 310 // Disable sync for the second client and then install an app on the first
311 // client, then enable sync on the second client. Both clients should have the 311 // client, then enable sync on the second client. Both clients should have the
312 // same app with identical app and page ordinals. 312 // same app with identical app and page ordinals.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 verifier()->GetExtensionService()->extension_prefs()-> 402 verifier()->GetExtensionService()->extension_prefs()->
403 extension_sorting()->SetPageOrdinal(extension_misc::kWebStoreAppId, 403 extension_sorting()->SetPageOrdinal(extension_misc::kWebStoreAppId,
404 cws_page_ordinal.CreateAfter()); 404 cws_page_ordinal.CreateAfter());
405 ASSERT_TRUE(AwaitQuiescence()); 405 ASSERT_TRUE(AwaitQuiescence());
406 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); 406 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
407 } 407 }
408 408
409 // TODO(akalin): Add tests exercising: 409 // TODO(akalin): Add tests exercising:
410 // - Offline installation/uninstallation behavior 410 // - Offline installation/uninstallation behavior
411 // - App-specific properties 411 // - App-specific properties
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698