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

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: 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 2c82ab0033a69fc650ad4e96c2b2a065f85f255d..d774d934c2712bd53e3da1c07b9fcc8bc81ed8ef 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/widget/desktop_aura/desktop_screen_x11.h"
+#endif
+
namespace {
// Passed as value of kTestType.
@@ -222,7 +226,10 @@ 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::GetTestDesktopScreenX11());
+#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