diff options
author | rkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-31 00:28:07 +0000 |
---|---|---|
committer | rkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-31 00:28:07 +0000 |
commit | 9e206d120c9569cd41c840548912bf4c436df967 (patch) | |
tree | f3c574826614bce220397f971593c9936dee7cc9 /ash/test/ash_test_base.h | |
parent | 3922a54915d163db29212285274d54a56f06f33d (diff) | |
download | chromium_src-9e206d120c9569cd41c840548912bf4c436df967.zip chromium_src-9e206d120c9569cd41c840548912bf4c436df967.tar.gz chromium_src-9e206d120c9569cd41c840548912bf4c436df967.tar.bz2 |
Fix view view in views examples.
The views delegate used in Views Examples derives from TestViewsDelegate, which returns a TestWebContents when WebView tries to create it's webcontents. Since this functionality is intended only for unit tests, moved the test webcontents creation to a subclass of TestViewsDelegate in ash_test_base. This leaves TestViewsDelegate and it's subclasses unaffected.
R=ben@chromium.org
BUG=None.
TEST=Ran aura_test_unittests and verified that the webview example in views examples through ash_shell works correctly.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=139690
Review URL: https://chromiumcodereview.appspot.com/10447096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139704 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test/ash_test_base.h')
-rw-r--r-- | ash/test/ash_test_base.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ash/test/ash_test_base.h b/ash/test/ash_test_base.h index c118a8a..2ca9246 100644 --- a/ash/test/ash_test_base.h +++ b/ash/test/ash_test_base.h @@ -10,10 +10,19 @@ #include "base/compiler_specific.h" #include "base/message_loop.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/views/test/test_views_delegate.h" namespace ash { namespace test { +class AshTestViewsDelegate : public views::TestViewsDelegate { + public: + // Overriden from TestViewsDelegate. + virtual content::WebContents* CreateWebContents( + content::BrowserContext* browser_context, + content::SiteInstance* site_instance) OVERRIDE; +}; + class AshTestBase : public testing::Test { public: AshTestBase(); |