blob: 130b9a8e4528b2df59ecf9b1b3c5bf44184da28d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_TEST_LIVE_SYNC_LIVE_THEMES_SYNC_TEST_H_
#define CHROME_TEST_LIVE_SYNC_LIVE_THEMES_SYNC_TEST_H_
#pragma once
#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/test/live_sync/live_sync_extension_helper.h"
#include "chrome/test/live_sync/live_sync_test.h"
class Profile;
class LiveThemesSyncTest : public LiveSyncTest {
public:
explicit LiveThemesSyncTest(TestType test_type);
virtual ~LiveThemesSyncTest();
protected:
// Like LiveSyncTest::SetupClients(), but also sets up
// |extension_helper_|.
virtual bool SetupClients() OVERRIDE WARN_UNUSED_RESULT;
// Gets the unique ID of the custom theme with the given index.
std::string GetCustomTheme(int index) const WARN_UNUSED_RESULT;
// Gets the ID of |profile|'s theme.
std::string GetThemeID(Profile* profile) const WARN_UNUSED_RESULT;
// Returns true iff |profile| is using a custom theme.
bool UsingCustomTheme(Profile* profile) const WARN_UNUSED_RESULT;
// Returns true iff |profile| is using the default theme.
bool UsingDefaultTheme(Profile* profile) const WARN_UNUSED_RESULT;
// Returns true iff |profile| is using the native theme.
bool UsingNativeTheme(Profile* profile) const 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 |profile|'s current theme is the given
// custom theme or if the given theme is pending install.
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);
};
#endif // CHROME_TEST_LIVE_SYNC_LIVE_THEMES_SYNC_TEST_H_
|