From 7164c7a1cfaf403c9acb90133eb109669bd18fcf Mon Sep 17 00:00:00 2001 From: "rkc@chromium.org" Date: Wed, 30 May 2012 23:51:42 +0000 Subject: 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 --- ash/screensaver/screensaver_view_unittest.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ash/screensaver') 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 views_delegate_; + scoped_ptr views_delegate_; scoped_ptr webview_test_helper_; DISALLOW_COPY_AND_ASSIGN(ScreensaverViewTest); -- cgit v1.1