| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 const int default_app_index = 1; | 405 const int default_app_index = 1; |
| 406 std::string default_app_id = InstallApp(GetProfile(0), default_app_index); | 406 std::string default_app_id = InstallApp(GetProfile(0), default_app_index); |
| 407 | 407 |
| 408 ASSERT_TRUE(AwaitQuiescence()); | 408 ASSERT_TRUE(AwaitQuiescence()); |
| 409 InstallAppsPendingForSync(GetProfile(0)); | 409 InstallAppsPendingForSync(GetProfile(0)); |
| 410 InstallAppsPendingForSync(GetProfile(1)); | 410 InstallAppsPendingForSync(GetProfile(1)); |
| 411 ASSERT_TRUE(AllProfilesHaveSameAppList()); | 411 ASSERT_TRUE(AllProfilesHaveSameAppList()); |
| 412 | 412 |
| 413 // Flag Default app in Profile 1. | 413 // Flag Default app in Profile 1. |
| 414 extensions::ExtensionPrefs::Get(GetProfile(1)) | 414 extensions::ExtensionPrefs::Get(GetProfile(1)) |
| 415 ->UpdateExtensionPref(default_app_id, | 415 ->UpdateExtensionPref(default_app_id, "was_installed_by_default", |
| 416 "was_installed_by_default", | 416 new base::Value(true)); |
| 417 new base::FundamentalValue(true)); | |
| 418 | 417 |
| 419 // Remove the default app in Profile 0 and verifier, ensure it was removed | 418 // Remove the default app in Profile 0 and verifier, ensure it was removed |
| 420 // in Profile 1. | 419 // in Profile 1. |
| 421 UninstallApp(GetProfile(0), default_app_index); | 420 UninstallApp(GetProfile(0), default_app_index); |
| 422 ASSERT_TRUE(AwaitQuiescence()); | 421 ASSERT_TRUE(AwaitQuiescence()); |
| 423 ASSERT_TRUE(AllProfilesHaveSameAppList()); | 422 ASSERT_TRUE(AllProfilesHaveSameAppList()); |
| 424 | 423 |
| 425 // Ensure that a REMOVE_DEFAULT_APP SyncItem entry exists in Profile 1. | 424 // Ensure that a REMOVE_DEFAULT_APP SyncItem entry exists in Profile 1. |
| 426 const app_list::AppListSyncableService::SyncItem* sync_item = | 425 const app_list::AppListSyncableService::SyncItem* sync_item = |
| 427 GetSyncItem(GetProfile(1), default_app_id); | 426 GetSyncItem(GetProfile(1), default_app_id); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 for (size_t i = 0; i < kNumAppsToMove; ++i) { | 516 for (size_t i = 0; i < kNumAppsToMove; ++i) { |
| 518 SyncAppListHelper::GetInstance()->MoveAppToFolder( | 517 SyncAppListHelper::GetInstance()->MoveAppToFolder( |
| 519 GetProfile(0), item_index, folder_id); | 518 GetProfile(0), item_index, folder_id); |
| 520 } | 519 } |
| 521 | 520 |
| 522 ASSERT_TRUE(AwaitQuiescence()); | 521 ASSERT_TRUE(AwaitQuiescence()); |
| 523 ASSERT_TRUE(AllProfilesHaveSameAppList()); | 522 ASSERT_TRUE(AllProfilesHaveSameAppList()); |
| 524 } | 523 } |
| 525 | 524 |
| 526 #endif // !defined(OS_MACOSX) | 525 #endif // !defined(OS_MACOSX) |
| OLD | NEW |