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

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

Issue 4732005: [Sync] Added some basic extension sync integration tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed rsimha's comments Created 10 years, 1 month 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
(Empty)
1 // Copyright (c) 2010 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 "chrome/test/live_sync/live_extensions_sync_test.h"
6
7 #include "base/basictypes.h"
8 #include "chrome/common/extensions/extension.h"
9
10 class SingleClientLiveExtensionsSyncTest : public LiveExtensionsSyncTest {
11 public:
12 SingleClientLiveExtensionsSyncTest()
13 : LiveExtensionsSyncTest(SINGLE_CLIENT) {}
14
15 virtual ~SingleClientLiveExtensionsSyncTest() {}
16
17 private:
18 DISALLOW_COPY_AND_ASSIGN(SingleClientLiveExtensionsSyncTest);
19 };
20
21 IN_PROC_BROWSER_TEST_F(SingleClientLiveExtensionsSyncTest,
22 StartWithNoExtensions) {
23 ASSERT_TRUE(SetupSync());
24
25 ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
26 }
27
28 IN_PROC_BROWSER_TEST_F(SingleClientLiveExtensionsSyncTest,
29 StartWithSomeExtensions) {
30 ASSERT_TRUE(SetupClients());
31
32 const int kNumExtensions = 5;
33 for (int i = 0; i < kNumExtensions; ++i) {
34 InstallExtension(GetProfile(0), GetExtension(i));
35 InstallExtension(verifier(), GetExtension(i));
36 }
37
38 ASSERT_TRUE(SetupSync());
39
40 ASSERT_TRUE(AwaitQuiescence());
Raghu Simha 2010/11/12 01:40:50 This can stay as AwaitSyncCycleCompletion. AwaitQu
Raghu Simha 2010/11/12 01:43:42 Oh crap, AwaitQuiescence is fine here because it f
akalin 2010/11/12 02:19:03 Not needed at all! On 2010/11/12 01:43:42, rsimha
41
42 ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
43 }
44
45 IN_PROC_BROWSER_TEST_F(SingleClientLiveExtensionsSyncTest,
46 InstallSomeExtensions) {
47 ASSERT_TRUE(SetupSync());
48
49 const int kNumExtensions = 5;
50 for (int i = 0; i < kNumExtensions; ++i) {
51 InstallExtension(GetProfile(0), GetExtension(i));
52 InstallExtension(verifier(), GetExtension(i));
53 }
54
55 ASSERT_TRUE(AwaitQuiescence());
Raghu Simha 2010/11/12 01:40:50 Same comment as above.
akalin 2010/11/12 02:19:03 It's a single-client test, so AwaitQuiescence is o
Raghu Simha 2010/11/12 02:32:20 Yeah, in this case, it's equivalent to a call to A
akalin 2010/11/12 02:47:10 Done.
56
57 ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698