Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: chrome/test/base/in_process_browser_test.cc

Issue 2327623002: X11: Add TestDesktopScreenX11 to simulate mouse movement in ui tests (Closed)
Patch Set: Move test_desktop_screen_x11 to test_support_internal Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/base/in_process_browser_test.cc
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index d08bd2f16c57b3cd215cb5aa3788189a847943a0..071c78029ca051ef23151a92ab66b42dd781399b 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -86,6 +86,10 @@
#include "chrome/test/base/default_ash_event_generator_delegate.h"
#endif
+#if !defined(OS_CHROMEOS) && defined(OS_LINUX)
+#include "ui/views/test/test_desktop_screen_x11.h"
+#endif
+
namespace {
// Passed as value of kTestType.
@@ -222,7 +226,11 @@ void InProcessBrowserTest::SetUp() {
command_line->AppendSwitchASCII(ash::switches::kAshHostWindowBounds,
"0+0-1280x800");
}
-#endif // defined(OS_CHROMEOS)
+#elif defined(OS_LINUX)
+ DCHECK(!display::Screen::GetScreen());
+ display::Screen::SetScreenInstance(
+ views::test::TestDesktopScreenX11::GetInstance());
+#endif
// Always use a mocked password storage if OS encryption is used (which is
// when anything sensitive gets stored, including Cookies). Without this on

Powered by Google App Engine
This is Rietveld 408576698