diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 16:52:23 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 16:52:23 +0000 |
commit | a42b559451a78a1fc1a8d1f2bfe129d51924a3c0 (patch) | |
tree | 846d078b08aa558e7c20f8f44e3dd46571a514cb /chrome/test/testing_profile.h | |
parent | 9aca7238d57d556e52532ab3491a11192bfad6b8 (diff) | |
download | chromium_src-a42b559451a78a1fc1a8d1f2bfe129d51924a3c0.zip chromium_src-a42b559451a78a1fc1a8d1f2bfe129d51924a3c0.tar.gz chromium_src-a42b559451a78a1fc1a8d1f2bfe129d51924a3c0.tar.bz2 |
GTK Themes: Add basic unit tests for gtk themes.
Review URL: http://codereview.chromium.org/186019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25317 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/testing_profile.h')
-rw-r--r-- | chrome/test/testing_profile.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h index d786017..bc06a3d 100644 --- a/chrome/test/testing_profile.h +++ b/chrome/test/testing_profile.h @@ -53,8 +53,9 @@ class TestingProfile : public Profile { // Creates a TemplateURLModel. If not invoked the TemplateURLModel is NULL. void CreateTemplateURLModel(); - // Creates a ThemeProvider. If not invoked the ThemeProvider is NULL. - void CreateThemeProvider(); + // Uses a specific theme provider for this profile. TestingProfile takes + // ownership of |theme_provider|. + void UseThemeProvider(BrowserThemeProvider* theme_provider); virtual FilePath GetPath() { return path_; @@ -142,7 +143,7 @@ class TestingProfile : public Profile { virtual bool HasCreatedDownloadManager() const { return false; } - virtual void InitThemes() { } + virtual void InitThemes(); virtual void SetTheme(Extension* extension) { } virtual void SetNativeTheme() { } virtual void ClearTheme() { } @@ -150,6 +151,7 @@ class TestingProfile : public Profile { return NULL; } virtual ThemeProvider* GetThemeProvider() { + InitThemes(); return theme_provider_.get(); } virtual URLRequestContext* GetRequestContext() { @@ -267,8 +269,9 @@ class TestingProfile : public Profile { // The SessionService. Defaults to NULL, but can be set using the setter. scoped_refptr<SessionService> session_service_; - // The theme provider. Only created if CreateThemeProvider is invoked. + // The theme provider. Created lazily by GetThemeProvider()/InitThemes(). scoped_refptr<BrowserThemeProvider> theme_provider_; + bool created_theme_provider_; // Do we have a history service? This defaults to the value of // history_service, but can be explicitly set. |