1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_THEMES_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_THEMES_HELPER_H_
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/sync/test/integration/sync_test.h"
16 namespace themes_helper
{
18 // Gets the unique ID of the custom theme with the given index.
19 std::string
GetCustomTheme(int index
) WARN_UNUSED_RESULT
;
21 // Gets the ID of |profile|'s theme.
22 std::string
GetThemeID(Profile
* profile
) WARN_UNUSED_RESULT
;
24 // Returns true iff |profile| is using a custom theme.
25 bool UsingCustomTheme(Profile
* profile
) WARN_UNUSED_RESULT
;
27 // Returns true iff |profile| is using the default theme.
28 bool UsingDefaultTheme(Profile
* profile
) WARN_UNUSED_RESULT
;
30 // Returns true iff |profile| is using the system theme.
31 bool UsingSystemTheme(Profile
* profile
) WARN_UNUSED_RESULT
;
33 // Returns true iff a theme with the given ID is pending install in
35 bool ThemeIsPendingInstall(
36 Profile
* profile
, const std::string
& id
) WARN_UNUSED_RESULT
;
38 // Sets |profile| to use the custom theme with the given index.
39 void UseCustomTheme(Profile
* profile
, int index
);
41 // Sets |profile| to use the default theme.
42 void UseDefaultTheme(Profile
* profile
);
44 // Sets |profile| to use the system theme.
45 void UseSystemTheme(Profile
* profile
);
47 // Waits until |theme| is pending for install on |profile|.
48 // Returns false in case of timeout.
49 bool AwaitThemeIsPendingInstall(Profile
* profile
, const std::string
& theme
);
51 // Waits until |profile| is using the system theme.
52 // Returns false in case of timeout.
53 bool AwaitUsingSystemTheme(Profile
* profile
);
55 // Waits until |profile| is using the default theme.
56 // Returns false in case of timeout.
57 bool AwaitUsingDefaultTheme(Profile
* profile
);
59 } // namespace themes_helper
61 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_THEMES_HELPER_H_