| 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 "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/extensions/bookmark_app_helper.h" | 8 #include "chrome/browser/extensions/bookmark_app_helper.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/launch_util.h" | 10 #include "chrome/browser/extensions/launch_util.h" |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 extensions::AppSyncData original_data( | 494 extensions::AppSyncData original_data( |
| 495 extension_sync_service->GetAppSyncData(*extension)); | 495 extension_sync_service->GetAppSyncData(*extension)); |
| 496 | 496 |
| 497 // Create an invalid launch type and ensure it doesn't get down-synced. This | 497 // Create an invalid launch type and ensure it doesn't get down-synced. This |
| 498 // simulates the case of a future launch type being added which old versions | 498 // simulates the case of a future launch type being added which old versions |
| 499 // don't yet understand. | 499 // don't yet understand. |
| 500 extensions::AppSyncData invalid_launch_type_data( | 500 extensions::AppSyncData invalid_launch_type_data( |
| 501 *extension, | 501 *extension, |
| 502 original_data.extension_sync_data().enabled(), | 502 original_data.extension_sync_data().enabled(), |
| 503 original_data.extension_sync_data().incognito_enabled(), | 503 original_data.extension_sync_data().incognito_enabled(), |
| 504 original_data.extension_sync_data().remote_install(), |
| 504 original_data.app_launch_ordinal(), | 505 original_data.app_launch_ordinal(), |
| 505 original_data.page_ordinal(), | 506 original_data.page_ordinal(), |
| 506 extensions::NUM_LAUNCH_TYPES); | 507 extensions::NUM_LAUNCH_TYPES); |
| 507 extension_sync_service->ProcessAppSyncData(invalid_launch_type_data); | 508 extension_sync_service->ProcessAppSyncData(invalid_launch_type_data); |
| 508 | 509 |
| 509 // The launch type should remain the same. | 510 // The launch type should remain the same. |
| 510 ASSERT_TRUE(AwaitQuiescence()); | 511 ASSERT_TRUE(AwaitQuiescence()); |
| 511 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | 512 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); |
| 512 } | 513 } |
| 513 | 514 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 554 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
| 554 content::NotificationService::AllSources()); | 555 content::NotificationService::AllSources()); |
| 555 ASSERT_TRUE(AwaitQuiescence()); | 556 ASSERT_TRUE(AwaitQuiescence()); |
| 556 windowed_observer.Wait(); | 557 windowed_observer.Wait(); |
| 557 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | 558 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); |
| 558 } | 559 } |
| 559 } | 560 } |
| 560 // TODO(akalin): Add tests exercising: | 561 // TODO(akalin): Add tests exercising: |
| 561 // - Offline installation/uninstallation behavior | 562 // - Offline installation/uninstallation behavior |
| 562 // - App-specific properties | 563 // - App-specific properties |
| OLD | NEW |