diff options
author | dnicoara <dnicoara@chromium.org> | 2014-11-13 08:02:08 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-13 16:02:29 +0000 |
commit | 085dfcf222ff4fc9ecf9f9ca9239ea057e23ebc8 (patch) | |
tree | f7a462f3da83b01a088b46b52a3b2d89aa009faa /ui | |
parent | 5adfb90d2eb639571f9cdafd7173be1639a5b1f9 (diff) | |
download | chromium_src-085dfcf222ff4fc9ecf9f9ca9239ea057e23ebc8.zip chromium_src-085dfcf222ff4fc9ecf9f9ca9239ea057e23ebc8.tar.gz chromium_src-085dfcf222ff4fc9ecf9f9ca9239ea057e23ebc8.tar.bz2 |
[Ozone] Create test touch device before creating the UI message loop
Blocking operations are called in the TouchEventConverter's constructor
causing the tests to CHECK if they are executed on the UI thread.
BUG=none
NOTRY=true
TBR=spang@chromium.org
Review URL: https://codereview.chromium.org/727503002
Cr-Commit-Position: refs/heads/master@{#304030}
Diffstat (limited to 'ui')
-rw-r--r-- | ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc index e54517a..0c5d6d4 100644 --- a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc +++ b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc @@ -132,9 +132,12 @@ class TouchEventConverterEvdevTest : public testing::Test { events_in_ = evdev_io[0]; events_out_ = evdev_io[1]; - loop_ = new base::MessageLoopForUI; + // Device creation happens on a worker thread since it may involve blocking + // operations. Simulate that by creating it before creating a UI message + // loop. device_ = new ui::MockTouchEventConverterEvdev( events_in_, base::FilePath(kTestDevicePath)); + loop_ = new base::MessageLoopForUI; } void TearDown() override { |