summaryrefslogtreecommitdiffstats
path: root/ui/views/test
diff options
context:
space:
mode:
authorrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 09:10:14 +0000
committerrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 09:10:14 +0000
commit4f5c4b89293b9cd686468e7e921df16aa80d891b (patch)
tree9c32a2068eefaef9b1a3831dbad9656c79143171 /ui/views/test
parent69bfd2e9ba568606ac4363e1772af826d59624d7 (diff)
downloadchromium_src-4f5c4b89293b9cd686468e7e921df16aa80d891b.zip
chromium_src-4f5c4b89293b9cd686468e7e921df16aa80d891b.tar.gz
chromium_src-4f5c4b89293b9cd686468e7e921df16aa80d891b.tar.bz2
Revert 134878 - Re-implement the screensaver to use WebView instead of ExtensionDialogHost.
Use WebView to render the screensaver extension instead of ExtensionDialogHost. Using the RenderViewGone override to detect termination of the renderer process to restart it. Added browser tests. R=ben@chromium.org,sky@chromium.org BUG=chromium-os:28211 TEST=Tested that the screensaver comes up; tested the reload via crashing the extension renderer with SIG_ABRT; also ran browser tests. Review URL: https://chromiumcodereview.appspot.com/10191010 TBR=rkc@chromium.org Review URL: https://chromiumcodereview.appspot.com/10316004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/test')
-rw-r--r--ui/views/test/DEPS3
-rw-r--r--ui/views/test/test_views_delegate.cc8
-rw-r--r--ui/views/test/test_views_delegate.h4
-rw-r--r--ui/views/test/webview_test_helper.cc34
-rw-r--r--ui/views/test/webview_test_helper.h41
5 files changed, 0 insertions, 90 deletions
diff --git a/ui/views/test/DEPS b/ui/views/test/DEPS
deleted file mode 100644
index 659b105..0000000
--- a/ui/views/test/DEPS
+++ /dev/null
@@ -1,3 +0,0 @@
-include_rules = [
- "+content/test",
-]
diff --git a/ui/views/test/test_views_delegate.cc b/ui/views/test/test_views_delegate.cc
index 21ae8ae..a8fe511 100644
--- a/ui/views/test/test_views_delegate.cc
+++ b/ui/views/test/test_views_delegate.cc
@@ -5,7 +5,6 @@
#include "ui/views/test/test_views_delegate.h"
#include "base/logging.h"
-#include "content/test/web_contents_tester.h"
#include "ui/base/clipboard/clipboard.h"
namespace views {
@@ -65,11 +64,4 @@ views::NativeWidgetHelperAura* TestViewsDelegate::CreateNativeWidgetHelper(
}
#endif
-content::WebContents* TestViewsDelegate::CreateWebContents(
- content::BrowserContext* browser_context,
- content::SiteInstance* site_instance) {
- return content::WebContentsTester::CreateTestWebContents(browser_context,
- site_instance);
-}
-
} // namespace views
diff --git a/ui/views/test/test_views_delegate.h b/ui/views/test/test_views_delegate.h
index 54ae0be..1ea5cdf 100644
--- a/ui/views/test/test_views_delegate.h
+++ b/ui/views/test/test_views_delegate.h
@@ -64,10 +64,6 @@ class TestViewsDelegate : public ViewsDelegate {
views::NativeWidgetAura* native_widget) OVERRIDE;
#endif
- virtual content::WebContents* CreateWebContents(
- content::BrowserContext* browser_context,
- content::SiteInstance* site_instance) OVERRIDE;
-
private:
mutable scoped_ptr<ui::Clipboard> clipboard_;
bool use_transparent_windows_;
diff --git a/ui/views/test/webview_test_helper.cc b/ui/views/test/webview_test_helper.cc
deleted file mode 100644
index 6ff3925..0000000
--- a/ui/views/test/webview_test_helper.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "ui/views/test/webview_test_helper.h"
-
-#include "base/message_loop.h"
-#include "content/test/mock_render_process_host.h"
-#include "content/test/test_browser_thread.h"
-#include "content/test/test_content_client_initializer.h"
-#include "content/test/test_render_view_host_factory.h"
-#include "ui/views/controls/webview/webview.h"
-
-namespace views {
-
-WebViewTestHelper::WebViewTestHelper(MessageLoopForUI* ui_loop) {
- test_content_client_initializer_.reset(
- new content::TestContentClientInitializer);
-
- // Setup to register a new RenderViewHost factory which manufactures
- // mock render process hosts. This ensures that we never create a 'real'
- // render view host since support for it doesn't exist in unit tests.
- rph_factory_.reset(new content::MockRenderProcessHostFactory());
- rvh_factory_.reset(
- new content::TestRenderViewHostFactory(rph_factory_.get()));
-
- ui_thread_.reset(
- new content::TestBrowserThread(content::BrowserThread::UI, ui_loop));
-}
-
-WebViewTestHelper::~WebViewTestHelper() {
-}
-
-} // namespace views
diff --git a/ui/views/test/webview_test_helper.h b/ui/views/test/webview_test_helper.h
deleted file mode 100644
index 9868bcc..0000000
--- a/ui/views/test/webview_test_helper.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2012 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 UI_VIEWS_TEST_WEB_VIEW_TEST_HELPER_H_
-#define UI_VIEWS_TEST_WEB_VIEW_TEST_HELPER_H_
-#pragma once
-
-#include "base/memory/scoped_ptr.h"
-
-class MessageLoopForUI;
-
-namespace content {
-class TestContentClientInitializer;
-class TestBrowserThread;
-class MockRenderProcessHostFactory;
-class TestRenderViewHostFactory;
-} // namespace content
-
-namespace views {
-
-class WebViewTestHelper {
- public:
- explicit WebViewTestHelper(MessageLoopForUI* ui_loop);
- virtual ~WebViewTestHelper();
-
- private:
- scoped_ptr<content::TestContentClientInitializer>
- test_content_client_initializer_;
-
- scoped_ptr<content::TestBrowserThread> ui_thread_;
-
- scoped_ptr<content::MockRenderProcessHostFactory> rph_factory_;
- scoped_ptr<content::TestRenderViewHostFactory> rvh_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(WebViewTestHelper);
-};
-
-} // namespace views
-
-#endif // UI_VIEWS_TEST_WEB_VIEW_TEST_HELPER_H_