Index: ui/aura/window_tree_host_x11_unittest.cc |
diff --git a/ui/aura/window_tree_host_x11_unittest.cc b/ui/aura/window_tree_host_x11_unittest.cc |
index 2fbdd463b2fc1088a9ab809b90e54eb616defd92..bbad80724644dfef93874bece21674955def29d2 100644 |
--- a/ui/aura/window_tree_host_x11_unittest.cc |
+++ b/ui/aura/window_tree_host_x11_unittest.cc |
@@ -119,7 +119,8 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToOneRootWindow) { |
ui::ScopedXI2Event scoped_xevent; |
#if defined(OS_CHROMEOS) |
- // This touch is out of bounds. |
+ // This touch device does not have TouchCTM stored in the root window. |
+ // So touch event is discarded. |
scoped_xevent.InitTouchEvent( |
0, XI_TouchBegin, 5, gfx::Point(1500, 2500), valuators); |
window_tree_host->Dispatch(scoped_xevent); |
@@ -128,6 +129,9 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToOneRootWindow) { |
EXPECT_EQ(gfx::Point(0, 0), delegate->last_touch_location()); |
#endif // defined(OS_CHROMEOS) |
+ // Make the touchscreen 0 associated with the root window. |
+ window_tree_host->SetTouchCTM(0, TouchCTM()); |
+ |
// Following touchs are within bounds and are passed to delegate. |
scoped_xevent.InitTouchEvent( |
0, XI_TouchBegin, 5, gfx::Point(1500, 1500), valuators); |
@@ -191,6 +195,9 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) { |
EXPECT_EQ(ui::ET_UNKNOWN, delegate2->last_touch_type()); |
EXPECT_EQ(-1, delegate2->last_touch_id()); |
+ // Make the touchscreen 0 associated with the second root window. |
+ window_tree_host2->SetTouchCTM(0, TouchCTM()); |
+ |
// 2 Touch events are targeted at the second WindowTreeHost. |
ui::ScopedXI2Event scoped_xevent; |
scoped_xevent.InitTouchEvent( |