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

Unified Diff: ui/events/ozone/evdev/input_injector_evdev_unittest.cc

Issue 882503002: [PATCH 9.2/11] ozone: evdev: Use DeviceEventDispatcherEvdev from InputInjectorEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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/events/ozone/evdev/input_injector_evdev.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/input_injector_evdev_unittest.cc
diff --git a/ui/events/ozone/evdev/input_injector_evdev_unittest.cc b/ui/events/ozone/evdev/input_injector_evdev_unittest.cc
index 7d871e3508fa549867a527175d23217e831503e2..39c7a79cf7644fa8899b49c0c5a6714cd53ff08c 100644
--- a/ui/events/ozone/evdev/input_injector_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/input_injector_evdev_unittest.cc
@@ -8,9 +8,10 @@
#include "base/run_loop.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/events/ozone/device/device_manager.h"
#include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
-#include "ui/events/ozone/evdev/event_modifiers_evdev.h"
-#include "ui/events/ozone/evdev/keyboard_evdev.h"
+#include "ui/events/ozone/evdev/event_converter_test_util.h"
+#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/events/ozone/events_ozone.h"
#include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
@@ -108,10 +109,11 @@ class InputInjectorEvdevTest : public testing::Test {
void ExpectClick(int x, int y, int button, int count);
EventObserver event_observer_;
- EventModifiersEvdev modifiers_;
EventDispatchCallback dispatch_callback_;
MockCursorEvdev cursor_;
- KeyboardEvdev keyboard_;
+
+ scoped_ptr<DeviceManager> device_manager_;
+ scoped_ptr<EventFactoryEvdev> event_factory_;
InputInjectorEvdev injector_;
@@ -125,10 +127,14 @@ class InputInjectorEvdevTest : public testing::Test {
InputInjectorEvdevTest::InputInjectorEvdevTest()
: dispatch_callback_(base::Bind(&EventObserver::EventDispatchCallback,
base::Unretained(&event_observer_))),
- keyboard_(&modifiers_,
- KeyboardLayoutEngineManager::GetKeyboardLayoutEngine(),
- dispatch_callback_),
- injector_(&modifiers_, &cursor_, &keyboard_, dispatch_callback_) {
+ device_manager_(CreateDeviceManagerForTest()),
+ event_factory_(CreateEventFactoryEvdevForTest(
+ &cursor_,
+ device_manager_.get(),
+ ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine(),
+ dispatch_callback_)),
+ injector_(CreateDeviceEventDispatcherEvdevForTest(event_factory_.get()),
+ &cursor_) {
}
void InputInjectorEvdevTest::SimulateMouseClick(int x,
« no previous file with comments | « ui/events/ozone/evdev/input_injector_evdev.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698