Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/sync/profile_sync_service_harness.h" | 6 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| 7 #include "chrome/browser/sync/test/integration/apps_helper.h" | 7 #include "chrome/browser/sync/test/integration/apps_helper.h" |
| 8 #include "chrome/browser/sync/test/integration/sync_test.h" | 8 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 9 | 9 |
| 10 using apps_helper::AllProfilesHaveSameAppsAsVerifier; | 10 using apps_helper::AllProfilesHaveSameAppsAsVerifier; |
| 11 using apps_helper::InstallApp; | 11 using apps_helper::InstallApp; |
| 12 using apps_helper::InstallPlatformApp; | |
| 12 | 13 |
| 13 class SingleClientAppsSyncTest : public SyncTest { | 14 class SingleClientAppsSyncTest : public SyncTest { |
| 14 public: | 15 public: |
| 15 SingleClientAppsSyncTest() : SyncTest(SINGLE_CLIENT) {} | 16 SingleClientAppsSyncTest() : SyncTest(SINGLE_CLIENT) {} |
| 16 | 17 |
| 17 virtual ~SingleClientAppsSyncTest() {} | 18 virtual ~SingleClientAppsSyncTest() {} |
| 18 | 19 |
| 19 private: | 20 private: |
| 20 DISALLOW_COPY_AND_ASSIGN(SingleClientAppsSyncTest); | 21 DISALLOW_COPY_AND_ASSIGN(SingleClientAppsSyncTest); |
| 21 }; | 22 }; |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 33 for (int i = 0; i < kNumApps; ++i) { | 34 for (int i = 0; i < kNumApps; ++i) { |
| 34 InstallApp(GetProfile(0), i); | 35 InstallApp(GetProfile(0), i); |
| 35 InstallApp(verifier(), i); | 36 InstallApp(verifier(), i); |
| 36 } | 37 } |
| 37 | 38 |
| 38 ASSERT_TRUE(SetupSync()); | 39 ASSERT_TRUE(SetupSync()); |
| 39 | 40 |
| 40 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | 41 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); |
| 41 } | 42 } |
| 42 | 43 |
| 44 IN_PROC_BROWSER_TEST_F(SingleClientAppsSyncTest, StartWithSomePlatformApps) { | |
| 45 ASSERT_TRUE(SetupClients()); | |
| 46 | |
| 47 const int kNumApps = 5; | |
| 48 for (int i = 0; i < kNumApps; ++i) { | |
| 49 InstallPlatformApp(GetProfile(0), i); | |
| 50 InstallPlatformApp(verifier(), i); | |
| 51 } | |
| 52 | |
| 53 ASSERT_TRUE(SetupSync()); | |
| 54 | |
| 55 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | |
|
akalin
2012/11/16 18:38:53
Doesn't AllProfileHaveSameAppsAsVerifier() have to
Marijn Kruisselbrink
2012/11/16 18:54:30
As far as I could tell AllProfileHaveSameAppsAsVer
akalin
2012/11/16 20:09:06
Okay, I think you're right.
Can you update the co
| |
| 56 } | |
| 57 | |
| 43 IN_PROC_BROWSER_TEST_F(SingleClientAppsSyncTest, InstallSomeApps) { | 58 IN_PROC_BROWSER_TEST_F(SingleClientAppsSyncTest, InstallSomeApps) { |
|
akalin
2012/11/16 18:38:53
can you add an InstallSomePlatformApps test also?
Marijn Kruisselbrink
2012/11/16 18:54:30
Done.
| |
| 44 ASSERT_TRUE(SetupSync()); | 59 ASSERT_TRUE(SetupSync()); |
| 45 | 60 |
| 46 const int kNumApps = 5; | 61 const int kNumApps = 5; |
| 47 for (int i = 0; i < kNumApps; ++i) { | 62 for (int i = 0; i < kNumApps; ++i) { |
| 48 InstallApp(GetProfile(0), i); | 63 InstallApp(GetProfile(0), i); |
| 49 InstallApp(verifier(), i); | 64 InstallApp(verifier(), i); |
| 50 } | 65 } |
| 51 | 66 |
| 52 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion( | 67 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion( |
| 53 "Waiting for app changes.")); | 68 "Waiting for app changes.")); |
| 54 | 69 |
| 55 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); | 70 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier()); |
| 56 } | 71 } |
| OLD | NEW |