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/app_sync_data.h" | 8 #include "chrome/browser/extensions/app_sync_data.h" |
9 #include "chrome/browser/extensions/bookmark_app_helper.h" | 9 #include "chrome/browser/extensions/bookmark_app_helper.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 extension_sync_service->GetAppSyncData(*extension)); | 404 extension_sync_service->GetAppSyncData(*extension)); |
405 | 405 |
406 // Create an invalid launch type and ensure it doesn't get down-synced. This | 406 // Create an invalid launch type and ensure it doesn't get down-synced. This |
407 // simulates the case of a future launch type being added which old versions | 407 // simulates the case of a future launch type being added which old versions |
408 // don't yet understand. | 408 // don't yet understand. |
409 extensions::AppSyncData invalid_launch_type_data( | 409 extensions::AppSyncData invalid_launch_type_data( |
410 *extension, | 410 *extension, |
411 original_data.extension_sync_data().enabled(), | 411 original_data.extension_sync_data().enabled(), |
412 original_data.extension_sync_data().incognito_enabled(), | 412 original_data.extension_sync_data().incognito_enabled(), |
413 original_data.extension_sync_data().remote_install(), | 413 original_data.extension_sync_data().remote_install(), |
| 414 original_data.extension_sync_data().all_urls_enabled(), |
414 original_data.app_launch_ordinal(), | 415 original_data.app_launch_ordinal(), |
415 original_data.page_ordinal(), | 416 original_data.page_ordinal(), |
416 extensions::NUM_LAUNCH_TYPES); | 417 extensions::NUM_LAUNCH_TYPES); |
417 extension_sync_service->ProcessAppSyncData(invalid_launch_type_data); | 418 extension_sync_service->ProcessAppSyncData(invalid_launch_type_data); |
418 | 419 |
419 // The launch type should remain the same. | 420 // The launch type should remain the same. |
420 ASSERT_TRUE(AwaitAllProfilesHaveSameAppsAsVerifier()); | 421 ASSERT_TRUE(AwaitAllProfilesHaveSameAppsAsVerifier()); |
421 } | 422 } |
422 | 423 |
423 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, BookmarkApp) { | 424 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, BookmarkApp) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 content::WindowedNotificationObserver windowed_observer( | 458 content::WindowedNotificationObserver windowed_observer( |
458 extensions::NOTIFICATION_CRX_INSTALLER_DONE, | 459 extensions::NOTIFICATION_CRX_INSTALLER_DONE, |
459 base::Bind(&AllProfilesHaveSameAppsAsVerifier)); | 460 base::Bind(&AllProfilesHaveSameAppsAsVerifier)); |
460 windowed_observer.Wait(); | 461 windowed_observer.Wait(); |
461 } | 462 } |
462 } | 463 } |
463 | 464 |
464 // TODO(akalin): Add tests exercising: | 465 // TODO(akalin): Add tests exercising: |
465 // - Offline installation/uninstallation behavior | 466 // - Offline installation/uninstallation behavior |
466 // - App-specific properties | 467 // - App-specific properties |
OLD | NEW |