| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_APPS_SYNC_TEST_H_ | |
| 6 #define CHROME_TEST_LIVE_SYNC_LIVE_APPS_SYNC_TEST_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/compiler_specific.h" | |
| 11 #include "chrome/test/live_sync/live_sync_extension_helper.h" | |
| 12 #include "chrome/test/live_sync/live_sync_test.h" | |
| 13 | |
| 14 class Profile; | |
| 15 | |
| 16 class LiveAppsSyncTest : public LiveSyncTest { | |
| 17 public: | |
| 18 explicit LiveAppsSyncTest(TestType test_type); | |
| 19 virtual ~LiveAppsSyncTest(); | |
| 20 | |
| 21 protected: | |
| 22 // Like LiveSyncTest::SetupClients(), but also sets up | |
| 23 // |extension_helper_|. | |
| 24 virtual bool SetupClients() OVERRIDE WARN_UNUSED_RESULT; | |
| 25 | |
| 26 // Returns true iff the profile with index |index| has the same apps as the | |
| 27 // verifier. | |
| 28 bool HasSameAppsAsVerifier(int index) WARN_UNUSED_RESULT; | |
| 29 | |
| 30 // Returns true iff all existing profiles have the same apps as the | |
| 31 // verifier. | |
| 32 bool AllProfilesHaveSameAppsAsVerifier() WARN_UNUSED_RESULT; | |
| 33 | |
| 34 // Installs the app for the given index to |profile|. | |
| 35 void InstallApp(Profile* profile, int index); | |
| 36 | |
| 37 // Uninstalls the app for the given index from |profile|. Assumes that it was | |
| 38 // previously installed. | |
| 39 void UninstallApp(Profile* profile, int index); | |
| 40 | |
| 41 // Installs all pending synced apps for |profile|. | |
| 42 void InstallAppsPendingForSync(Profile* profile); | |
| 43 | |
| 44 // Enables the app for the given index on |profile|. | |
| 45 void EnableApp(Profile* profile, int index); | |
| 46 | |
| 47 // Disables the appfor the given index on |profile|. | |
| 48 void DisableApp(Profile* profile, int index); | |
| 49 | |
| 50 // Enables the app for the given index in incognito mode on |profile|. | |
| 51 void IncognitoEnableApp(Profile* profile, int index); | |
| 52 | |
| 53 // Disables the app for the given index in incognito mode on |profile|. | |
| 54 void IncognitoDisableApp(Profile* profile, int index); | |
| 55 | |
| 56 private: | |
| 57 LiveSyncExtensionHelper extension_helper_; | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(LiveAppsSyncTest); | |
| 60 }; | |
| 61 | |
| 62 #endif // CHROME_TEST_LIVE_SYNC_LIVE_APPS_SYNC_TEST_H_ | |
| OLD | NEW |