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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "chrome/browser/extensions/extension_service.h" | 6 #include "chrome/browser/extensions/extension_service.h" |
7 #include "chrome/browser/extensions/extension_sorting.h" | 7 #include "chrome/browser/extensions/extension_sorting.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/sync/profile_sync_service_harness.h" | 9 #include "chrome/browser/sync/profile_sync_service_harness.h" |
10 #include "chrome/browser/sync/test/integration/apps_helper.h" | 10 #include "chrome/browser/sync/test/integration/apps_helper.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(syncer::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(GetClient(0)->AwaitFullSyncCompletion("Installed an app.")); |
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(syncer::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 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |