diff options
author | rkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 23:51:42 +0000 |
---|---|---|
committer | rkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 23:51:42 +0000 |
commit | 7164c7a1cfaf403c9acb90133eb109669bd18fcf (patch) | |
tree | bd53272948b863a7e4b4acce264dbce9add883fd /ash/screensaver | |
parent | db73b05e98b6e857c8bc722526834eb319c9ce6d (diff) | |
download | chromium_src-7164c7a1cfaf403c9acb90133eb109669bd18fcf.zip chromium_src-7164c7a1cfaf403c9acb90133eb109669bd18fcf.tar.gz chromium_src-7164c7a1cfaf403c9acb90133eb109669bd18fcf.tar.bz2 |
Revert 139690 - 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.
Review URL: https://chromiumcodereview.appspot.com/10447096
TBR=rkc@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10459041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/screensaver')
-rw-r--r-- | ash/screensaver/screensaver_view_unittest.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ash/screensaver/screensaver_view_unittest.cc b/ash/screensaver/screensaver_view_unittest.cc index 25cfb6d..47a19e2 100644 --- a/ash/screensaver/screensaver_view_unittest.cc +++ b/ash/screensaver/screensaver_view_unittest.cc @@ -8,6 +8,7 @@ #include "base/bind.h" #include "content/public/browser/browser_context.h" #include "ui/views/controls/webview/webview.h" +#include "ui/views/test/test_views_delegate.h" #include "ui/views/test/webview_test_helper.h" namespace ash { @@ -17,7 +18,7 @@ class ScreensaverViewTest : public ash::test::AshTestBase { public: ScreensaverViewTest() { url_ = GURL("http://www.google.com"); - views_delegate_.reset(new AshTestViewsDelegate); + views_delegate_.reset(new views::TestViewsDelegate); webview_test_helper_.reset(new views::WebViewTestHelper(message_loop())); } @@ -56,7 +57,7 @@ class ScreensaverViewTest : public ash::test::AshTestBase { GURL url_; private: - scoped_ptr<AshTestViewsDelegate> views_delegate_; + scoped_ptr<views::TestViewsDelegate> views_delegate_; scoped_ptr<views::WebViewTestHelper> webview_test_helper_; DISALLOW_COPY_AND_ASSIGN(ScreensaverViewTest); |