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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/sync/test/integration/apps_helper.h" | 10 #include "chrome/browser/sync/test/integration/apps_helper.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 } // namespace | 78 } // namespace |
79 | 79 |
80 class TwoClientAppListSyncTest : public SyncTest { | 80 class TwoClientAppListSyncTest : public SyncTest { |
81 public: | 81 public: |
82 TwoClientAppListSyncTest() : SyncTest(TWO_CLIENT_LEGACY) {} | 82 TwoClientAppListSyncTest() : SyncTest(TWO_CLIENT_LEGACY) {} |
83 | 83 |
84 ~TwoClientAppListSyncTest() override {} | 84 ~TwoClientAppListSyncTest() override {} |
85 | 85 |
86 // SyncTest | 86 // SyncTest |
87 void SetUpCommandLine(CommandLine* command_line) override { | 87 void SetUpCommandLine(base::CommandLine* command_line) override { |
88 SyncTest::SetUpCommandLine(command_line); | 88 SyncTest::SetUpCommandLine(command_line); |
89 command_line->AppendSwitch(app_list::switches::kEnableSyncAppList); | 89 command_line->AppendSwitch(app_list::switches::kEnableSyncAppList); |
90 } | 90 } |
91 | 91 |
92 bool SetupClients() override { | 92 bool SetupClients() override { |
93 if (!SyncTest::SetupClients()) | 93 if (!SyncTest::SetupClients()) |
94 return false; | 94 return false; |
95 | 95 |
96 // Init SyncAppListHelper to ensure that the extension system is initialized | 96 // Init SyncAppListHelper to ensure that the extension system is initialized |
97 // for each Profile. | 97 // for each Profile. |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 EXPECT_EQ(sync_pb::AppListSpecifics::TYPE_APP, sync_item->item_type); | 513 EXPECT_EQ(sync_pb::AppListSpecifics::TYPE_APP, sync_item->item_type); |
514 } | 514 } |
515 | 515 |
516 #if !defined(OS_MACOSX) | 516 #if !defined(OS_MACOSX) |
517 | 517 |
518 class TwoClientAppListSyncFolderTest : public TwoClientAppListSyncTest { | 518 class TwoClientAppListSyncFolderTest : public TwoClientAppListSyncTest { |
519 public: | 519 public: |
520 TwoClientAppListSyncFolderTest() {} | 520 TwoClientAppListSyncFolderTest() {} |
521 ~TwoClientAppListSyncFolderTest() override {} | 521 ~TwoClientAppListSyncFolderTest() override {} |
522 | 522 |
523 void SetUpCommandLine(CommandLine* command_line) override { | 523 void SetUpCommandLine(base::CommandLine* command_line) override { |
524 TwoClientAppListSyncTest::SetUpCommandLine(command_line); | 524 TwoClientAppListSyncTest::SetUpCommandLine(command_line); |
525 } | 525 } |
526 | 526 |
527 bool SetupClients() override { | 527 bool SetupClients() override { |
528 bool res = TwoClientAppListSyncTest::SetupClients(); | 528 bool res = TwoClientAppListSyncTest::SetupClients(); |
529 app_list::AppListSyncableService* verifier_service = | 529 app_list::AppListSyncableService* verifier_service = |
530 app_list::AppListSyncableServiceFactory::GetForProfile(verifier()); | 530 app_list::AppListSyncableServiceFactory::GetForProfile(verifier()); |
531 verifier_service->model()->SetFoldersEnabled(true); | 531 verifier_service->model()->SetFoldersEnabled(true); |
532 return res; | 532 return res; |
533 } | 533 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 GetProfile(0), item_index, folder_id); | 616 GetProfile(0), item_index, folder_id); |
617 SyncAppListHelper::GetInstance()->MoveAppToFolder( | 617 SyncAppListHelper::GetInstance()->MoveAppToFolder( |
618 verifier(), item_index, folder_id); | 618 verifier(), item_index, folder_id); |
619 } | 619 } |
620 | 620 |
621 ASSERT_TRUE(AwaitQuiescence()); | 621 ASSERT_TRUE(AwaitQuiescence()); |
622 ASSERT_TRUE(AllProfilesHaveSameAppListAsVerifier()); | 622 ASSERT_TRUE(AllProfilesHaveSameAppListAsVerifier()); |
623 } | 623 } |
624 | 624 |
625 #endif // !defined(OS_MACOSX) | 625 #endif // !defined(OS_MACOSX) |
OLD | NEW |