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 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_EXTENSIONS_SYNC_TEST_H_ | 5 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_EXTENSIONS_SYNC_TEST_H_ |
6 #define CHROME_TEST_LIVE_SYNC_LIVE_EXTENSIONS_SYNC_TEST_H_ | 6 #define CHROME_TEST_LIVE_SYNC_LIVE_EXTENSIONS_SYNC_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | |
10 | |
11 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
13 #include "base/memory/ref_counted.h" | 11 #include "chrome/test/live_sync/live_sync_extension_helper.h" |
14 #include "base/memory/scoped_temp_dir.h" | 12 #include "chrome/test/live_sync/live_sync_test.h" |
15 #include "chrome/test/live_sync/live_extensions_sync_test_base.h" | |
16 | 13 |
17 class Extension; | |
18 class Profile; | 14 class Profile; |
19 | 15 |
20 class LiveExtensionsSyncTest : public LiveExtensionsSyncTestBase { | 16 class LiveExtensionsSyncTest : public LiveSyncTest { |
21 public: | 17 public: |
22 explicit LiveExtensionsSyncTest(TestType test_type); | 18 explicit LiveExtensionsSyncTest(TestType test_type); |
23 virtual ~LiveExtensionsSyncTest(); | 19 virtual ~LiveExtensionsSyncTest(); |
24 | 20 |
25 protected: | 21 protected: |
26 // Returns true iff the given profile has the same extensions as the | 22 // Like LiveSyncTest::SetupClients(), but also sets up |
27 // verifier. | 23 // |extension_helper_|. |
28 bool HasSameExtensionsAsVerifier(int profile) WARN_UNUSED_RESULT; | 24 virtual bool SetupClients() OVERRIDE WARN_UNUSED_RESULT; |
29 | 25 |
30 // Returns true iff all existing profiles have the same extensions | 26 // Returns true iff all existing profiles have the same extensions |
31 // as the verifier. | 27 // as the verifier. |
32 bool AllProfilesHaveSameExtensionsAsVerifier() WARN_UNUSED_RESULT; | 28 bool AllProfilesHaveSameExtensionsAsVerifier() WARN_UNUSED_RESULT; |
33 | 29 |
| 30 // Installs the extension for the given index to |profile|. |
| 31 void InstallExtension(Profile* profile, int index); |
| 32 |
| 33 // Installs all pending synced extensions for |profile|. |
| 34 void InstallExtensionsPendingForSync(Profile* profile); |
| 35 |
34 private: | 36 private: |
35 // Returns true iff the given two profiles have the same set of | 37 LiveSyncExtensionHelper extension_helper_; |
36 // enabled, disabled, and pending extensions. | |
37 static bool HasSameExtensionsHelper( | |
38 Profile* profile1, Profile* profile2) WARN_UNUSED_RESULT; | |
39 | 38 |
40 DISALLOW_COPY_AND_ASSIGN(LiveExtensionsSyncTest); | 39 DISALLOW_COPY_AND_ASSIGN(LiveExtensionsSyncTest); |
41 }; | 40 }; |
42 | 41 |
43 #endif // CHROME_TEST_LIVE_SYNC_LIVE_EXTENSIONS_SYNC_TEST_H_ | 42 #endif // CHROME_TEST_LIVE_SYNC_LIVE_EXTENSIONS_SYNC_TEST_H_ |
OLD | NEW |