Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Side by Side Diff: chrome/test/live_sync/single_client_extensions_sync_test.cc

Issue 7599019: Allow sync integration tests to operate on multiple datatypes: Apps, Extensions, Themes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indents Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/test/live_sync/live_extensions_sync_test.h" 7 #include "chrome/test/live_sync/extensions_helper.h"
8 #include "chrome/test/live_sync/live_sync_test.h"
8 9
9 IN_PROC_BROWSER_TEST_F(SingleClientLiveExtensionsSyncTest, 10 using extensions_helper::AllProfilesHaveSameExtensionsAsVerifier;
10 StartWithNoExtensions) { 11 using extensions_helper::InstallExtension;
12
13 class SingleClientExtensionsSyncTest : public LiveSyncTest {
14 public:
15 SingleClientExtensionsSyncTest() : LiveSyncTest(SINGLE_CLIENT) {}
16
17 virtual ~SingleClientExtensionsSyncTest() {}
18
19 private:
20 DISALLOW_COPY_AND_ASSIGN(SingleClientExtensionsSyncTest);
21 };
22
23 IN_PROC_BROWSER_TEST_F(SingleClientExtensionsSyncTest, StartWithNoExtensions) {
11 ASSERT_TRUE(SetupSync()); 24 ASSERT_TRUE(SetupSync());
12 25
13 ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier()); 26 ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
14 } 27 }
15 28
16 IN_PROC_BROWSER_TEST_F(SingleClientLiveExtensionsSyncTest, 29 IN_PROC_BROWSER_TEST_F(SingleClientExtensionsSyncTest,
17 StartWithSomeExtensions) { 30 StartWithSomeExtensions) {
18 ASSERT_TRUE(SetupClients()); 31 ASSERT_TRUE(SetupClients());
19 32
20 const int kNumExtensions = 5; 33 const int kNumExtensions = 5;
21 for (int i = 0; i < kNumExtensions; ++i) { 34 for (int i = 0; i < kNumExtensions; ++i) {
22 InstallExtension(GetProfile(0), i); 35 InstallExtension(GetProfile(0), i);
23 InstallExtension(verifier(), i); 36 InstallExtension(verifier(), i);
24 } 37 }
25 38
26 ASSERT_TRUE(SetupSync()); 39 ASSERT_TRUE(SetupSync());
27 40
28 ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier()); 41 ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
29 } 42 }
30 43
31 IN_PROC_BROWSER_TEST_F(SingleClientLiveExtensionsSyncTest, 44 IN_PROC_BROWSER_TEST_F(SingleClientExtensionsSyncTest, InstallSomeExtensions) {
32 InstallSomeExtensions) {
33 ASSERT_TRUE(SetupSync()); 45 ASSERT_TRUE(SetupSync());
34 46
35 const int kNumExtensions = 5; 47 const int kNumExtensions = 5;
36 for (int i = 0; i < kNumExtensions; ++i) { 48 for (int i = 0; i < kNumExtensions; ++i) {
37 InstallExtension(GetProfile(0), i); 49 InstallExtension(GetProfile(0), i);
38 InstallExtension(verifier(), i); 50 InstallExtension(verifier(), i);
39 } 51 }
40 52
41 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( 53 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion(
42 "Waiting for extension changes.")); 54 "Waiting for extension changes."));
43 55
44 ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier()); 56 ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
45 } 57 }
OLDNEW
« no previous file with comments | « chrome/test/live_sync/single_client_apps_sync_test.cc ('k') | chrome/test/live_sync/single_client_live_apps_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698