| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/basictypes.h" | |
| 6 #include "chrome/browser/sync/profile_sync_service_harness.h" | |
| 7 #include "chrome/test/live_sync/live_apps_sync_test.h" | |
| 8 | |
| 9 class SingleClientLiveAppsSyncTest : public LiveAppsSyncTest { | |
| 10 public: | |
| 11 SingleClientLiveAppsSyncTest() | |
| 12 : LiveAppsSyncTest(SINGLE_CLIENT) {} | |
| 13 | |
| 14 virtual ~SingleClientLiveAppsSyncTest() {} | |
| 15 | |
| 16 private: | |
| 17 DISALLOW_COPY_AND_ASSIGN(SingleClientLiveAppsSyncTest); | |
| 18 }; | |
| 19 | |
| 20 IN_PROC_BROWSER_TEST_F(SingleClientLiveAppsSyncTest, | |
| 21 StartWithNoApps) { | |
| 22 ASSERT_TRUE(SetupSync()); | |
| 23 | |
| 24 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | |
| 25 } | |
| 26 | |
| 27 IN_PROC_BROWSER_TEST_F(SingleClientLiveAppsSyncTest, | |
| 28 StartWithSomeApps) { | |
| 29 ASSERT_TRUE(SetupClients()); | |
| 30 | |
| 31 const int kNumApps = 5; | |
| 32 for (int i = 0; i < kNumApps; ++i) { | |
| 33 InstallApp(GetProfile(0), i); | |
| 34 InstallApp(verifier(), i); | |
| 35 } | |
| 36 | |
| 37 ASSERT_TRUE(SetupSync()); | |
| 38 | |
| 39 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | |
| 40 } | |
| 41 | |
| 42 IN_PROC_BROWSER_TEST_F(SingleClientLiveAppsSyncTest, | |
| 43 InstallSomeApps) { | |
| 44 ASSERT_TRUE(SetupSync()); | |
| 45 | |
| 46 const int kNumApps = 5; | |
| 47 for (int i = 0; i < kNumApps; ++i) { | |
| 48 InstallApp(GetProfile(0), i); | |
| 49 InstallApp(verifier(), i); | |
| 50 } | |
| 51 | |
| 52 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( | |
| 53 "Waiting for app changes.")); | |
| 54 | |
| 55 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | |
| 56 } | |
| OLD | NEW |