| Index: chrome/test/live_sync/live_themes_sync_test.h
|
| diff --git a/chrome/test/live_sync/live_themes_sync_test.h b/chrome/test/live_sync/live_themes_sync_test.h
|
| index 69d64fd402bd18ddcc7bb0f6220a117c64ab3133..130b9a8e4528b2df59ecf9b1b3c5bf44184da28d 100644
|
| --- a/chrome/test/live_sync/live_themes_sync_test.h
|
| +++ b/chrome/test/live_sync/live_themes_sync_test.h
|
| @@ -6,56 +6,62 @@
|
| #define CHROME_TEST_LIVE_SYNC_LIVE_THEMES_SYNC_TEST_H_
|
| #pragma once
|
|
|
| -#include <vector>
|
| +#include <string>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| -#include "base/memory/ref_counted.h"
|
| -#include "base/memory/scoped_temp_dir.h"
|
| -#include "chrome/test/live_sync/live_extensions_sync_test_base.h"
|
| +#include "chrome/test/live_sync/live_sync_extension_helper.h"
|
| +#include "chrome/test/live_sync/live_sync_test.h"
|
|
|
| -class Extension;
|
| class Profile;
|
|
|
| -class LiveThemesSyncTest : public LiveExtensionsSyncTestBase {
|
| +class LiveThemesSyncTest : public LiveSyncTest {
|
| public:
|
| explicit LiveThemesSyncTest(TestType test_type);
|
| virtual ~LiveThemesSyncTest();
|
|
|
| protected:
|
| - // Set the theme of the given profile to a custom theme from the
|
| - // given theme extension.
|
| - static void SetTheme(Profile* profile, scoped_refptr<Extension> theme);
|
| + // Like LiveSyncTest::SetupClients(), but also sets up
|
| + // |extension_helper_|.
|
| + virtual bool SetupClients() OVERRIDE WARN_UNUSED_RESULT;
|
|
|
| - // Sets |profile| so that it uses the native theme.
|
| - void SetNativeTheme(Profile* profile);
|
| + // Gets the unique ID of the custom theme with the given index.
|
| + std::string GetCustomTheme(int index) const WARN_UNUSED_RESULT;
|
|
|
| - // Sets |profile| to the default theme.
|
| - void UseDefaultTheme(Profile* profile);
|
| + // Gets the ID of |profile|'s theme.
|
| + std::string GetThemeID(Profile* profile) const WARN_UNUSED_RESULT;
|
|
|
| - // Gets the custom theme of the given profile, or NULL if the given
|
| - // profile doesn't have one.
|
| - const Extension* GetCustomTheme(Profile* profile) WARN_UNUSED_RESULT;
|
| + // Returns true iff |profile| is using a custom theme.
|
| + bool UsingCustomTheme(Profile* profile) const WARN_UNUSED_RESULT;
|
|
|
| - // Returns true iff the given profile is using the default theme.
|
| - bool UsingDefaultTheme(Profile* profile) WARN_UNUSED_RESULT;
|
| + // Returns true iff |profile| is using the default theme.
|
| + bool UsingDefaultTheme(Profile* profile) const WARN_UNUSED_RESULT;
|
|
|
| - // Returns true iff the given profile is using the native theme. On
|
| - // platforms where the native theme is just the default theme, this
|
| - // is equivalent to UsingDefaultTheme().
|
| - bool UsingNativeTheme(Profile* profile) WARN_UNUSED_RESULT;
|
| + // Returns true iff |profile| is using the native theme.
|
| + bool UsingNativeTheme(Profile* profile) const WARN_UNUSED_RESULT;
|
|
|
| - // Returns true iff the given extension is pending install for the
|
| - // given profile.
|
| - bool ExtensionIsPendingInstall(
|
| - Profile* profile, const Extension* extension) WARN_UNUSED_RESULT;
|
| + // Returns true iff a theme with the given ID is pending install in
|
| + // |profile|.
|
| + bool ThemeIsPendingInstall(
|
| + Profile* profile, const std::string& id) const WARN_UNUSED_RESULT;
|
|
|
| - // Returns true iff the given profile's current theme is the given
|
| + // Returns true iff |profile|'s current theme is the given
|
| // custom theme or if the given theme is pending install.
|
| - bool HasOrWillHaveCustomTheme(Profile* profile,
|
| - const Extension* theme) WARN_UNUSED_RESULT;
|
| + bool HasOrWillHaveCustomTheme(
|
| + Profile* profile, const std::string& id) const WARN_UNUSED_RESULT;
|
| +
|
| + // Sets |profile| to use the custom theme with the given index.
|
| + void UseCustomTheme(Profile* profile, int index);
|
| +
|
| + // Sets |profile| to use the default theme.
|
| + void UseDefaultTheme(Profile* profile);
|
| +
|
| + // Sets |profile| to use the native theme.
|
| + void UseNativeTheme(Profile* profile);
|
|
|
| private:
|
| + LiveSyncExtensionHelper extension_helper_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(LiveThemesSyncTest);
|
| };
|
|
|
|
|