summaryrefslogtreecommitdiff
path: root/chromium/ui/views/controls/webview/webview_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/views/controls/webview/webview_unittest.cc')
-rw-r--r--chromium/ui/views/controls/webview/webview_unittest.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chromium/ui/views/controls/webview/webview_unittest.cc b/chromium/ui/views/controls/webview/webview_unittest.cc
index b3c86732c50..b679af9d8d2 100644
--- a/chromium/ui/views/controls/webview/webview_unittest.cc
+++ b/chromium/ui/views/controls/webview/webview_unittest.cc
@@ -8,10 +8,13 @@
#include <memory>
+#include "base/command_line.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
+#include "content/public/common/content_switches.h"
+#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/web_contents_tester.h"
@@ -151,6 +154,9 @@ class WebViewUnitTest : public views::test::WidgetTest {
// dependencies from content.
SetBrowserClientForTesting(&test_browser_client_);
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kDisableBackgroundingOccludedWindowsForTesting);
+
// Create a top level widget and add a child, and give it a WebView as a
// child.
top_level_widget_ = CreateTopLevelFramelessPlatformWidget();
@@ -186,6 +192,10 @@ class WebViewUnitTest : public views::test::WidgetTest {
}
private:
+ // TODO(lukasza): https://crbug.com/832100: Move the factory into
+ // TestingProfile, so individual tests don't need to worry about it.
+ content::ScopedMockRenderProcessHostFactory process_factory_;
+
content::TestBrowserThreadBundle test_browser_thread_bundle_;
std::unique_ptr<content::TestBrowserContext> browser_context_;
content::TestContentBrowserClient test_browser_client_;