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

Unified Diff: ui/views/test/test_desktop_screen_x11.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
« no previous file with comments | « ui/views/test/test_desktop_screen_x11.h ('k') | ui/views/test/ui_controls_factory_desktop_aurax11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/test_desktop_screen_x11.cc
diff --git a/ui/views/test/test_desktop_screen_x11.cc b/ui/views/test/test_desktop_screen_x11.cc
new file mode 100644
index 0000000000000000000000000000000000000000..097e4bf2a5196d23cbe504a20e85aec2c95ccca3
--- /dev/null
+++ b/ui/views/test/test_desktop_screen_x11.cc
@@ -0,0 +1,32 @@
+// Copyright 2016 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/test_desktop_screen_x11.h"
+
+#include "base/memory/singleton.h"
+
+namespace views {
+namespace test {
+
+TestDesktopScreenX11* TestDesktopScreenX11::GetInstance() {
+ return base::Singleton<TestDesktopScreenX11>::get();
+}
+
+TestDesktopScreenX11::TestDesktopScreenX11() {}
+
+TestDesktopScreenX11::~TestDesktopScreenX11() {}
+
+gfx::Point TestDesktopScreenX11::GetCursorScreenPoint() {
+ return cursor_screen_point_;
+}
+
+TestDesktopScreenX11* GetTestDesktopScreenX11() {
+ static std::unique_ptr<TestDesktopScreenX11> test_screen_instance;
+ if (!test_screen_instance.get())
+ test_screen_instance.reset(new TestDesktopScreenX11());
+ return test_screen_instance.get();
+}
+
+} // namespace test
+} // namespace views
« no previous file with comments | « ui/views/test/test_desktop_screen_x11.h ('k') | ui/views/test/ui_controls_factory_desktop_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698