Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 } | |
| OLD | NEW |