Chromium Code Reviews| 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 415 GetProfile(1)->GetExtensionService()->extension_prefs()-> | 415 GetProfile(1)->GetExtensionService()->extension_prefs()-> |
| 416 extension_sorting()->SetPageOrdinal(extension_misc::kWebStoreAppId, | 416 extension_sorting()->SetPageOrdinal(extension_misc::kWebStoreAppId, |
| 417 cws_page_ordinal.CreateAfter()); | 417 cws_page_ordinal.CreateAfter()); |
| 418 verifier()->GetExtensionService()->extension_prefs()-> | 418 verifier()->GetExtensionService()->extension_prefs()-> |
| 419 extension_sorting()->SetPageOrdinal(extension_misc::kWebStoreAppId, | 419 extension_sorting()->SetPageOrdinal(extension_misc::kWebStoreAppId, |
| 420 cws_page_ordinal.CreateAfter()); | 420 cws_page_ordinal.CreateAfter()); |
| 421 ASSERT_TRUE(AwaitQuiescence()); | 421 ASSERT_TRUE(AwaitQuiescence()); |
| 422 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | 422 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); |
| 423 } | 423 } |
| 424 | 424 |
| 425 // Adjust the chrome app location within the app list on the first client and | |
| 426 // sync. Both clients should have the same app list ordinal values for the | |
| 427 // chrome app. | |
| 428 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateChromeAppAppListOrdinal) { | |
| 429 ASSERT_TRUE(SetupSync()); | |
| 430 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | |
| 431 | |
| 432 // Change the app list ordinal. | |
| 433 AppListExtensionOrdering* ordering = | |
| 434 GetProfile(0)->GetExtensionService()->extension_prefs()-> | |
| 435 app_list_extension_ordering(); | |
| 436 AppListExtensionOrdering* verifier_ordering = | |
| 437 verifier()->GetExtensionService()->extension_prefs()-> | |
| 438 app_list_extension_ordering(); | |
| 439 ordering->Erase(extension_misc::kChromeAppId); | |
| 440 verifier_ordering->Erase(extension_misc::kChromeAppId); | |
| 441 ordering->InsertAtNextAvailable(extension_misc::kChromeAppId); | |
| 442 verifier_ordering->InsertAtNextAvailable(extension_misc::kChromeAppId); | |
|
koz (OOO until 15th September)
2013/06/18 07:41:36
This might read better like
MoveChromeAppToEnd(or
calamity
2013/06/19 05:09:17
Done.
| |
| 443 ASSERT_TRUE(AwaitQuiescence()); | |
| 444 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | |
| 445 } | |
| 446 | |
| 425 // TODO(akalin): Add tests exercising: | 447 // TODO(akalin): Add tests exercising: |
| 426 // - Offline installation/uninstallation behavior | 448 // - Offline installation/uninstallation behavior |
| 427 // - App-specific properties | 449 // - App-specific properties |
| OLD | NEW |