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

Unified Diff: ash/host/ash_window_tree_host_x11_unittest.cc

Issue 191223007: Move touch CTM from X into Chrome (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move the logic of if a touch event should be dispatched to a root window into CanDispatchEvent() Created 6 years, 8 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: ash/host/ash_window_tree_host_x11_unittest.cc
diff --git a/ash/host/ash_window_tree_host_x11_unittest.cc b/ash/host/ash_window_tree_host_x11_unittest.cc
index efd25c04e26e5fb849f5fd2e9f288aa7460f12e5..b92d5b4db7b9860107b9382e134a5eda3ba5500c 100644
--- a/ash/host/ash_window_tree_host_x11_unittest.cc
+++ b/ash/host/ash_window_tree_host_x11_unittest.cc
@@ -162,8 +162,7 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
EXPECT_EQ(ui::ET_TOUCH_PRESSED, handler2->last_touch_type());
EXPECT_EQ(0, handler2->last_touch_id());
- EXPECT_EQ(gfx::Point(1500, 2500 - host2_y_offset),
- handler2->last_touch_location());
+ EXPECT_EQ(gfx::Point(1500, 2500), handler2->last_touch_location());
scoped_xevent.InitTouchEvent(
0, XI_TouchBegin, 6, gfx::Point(1600, 2600), valuators);
@@ -174,8 +173,7 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
EXPECT_EQ(ui::ET_TOUCH_PRESSED, handler2->last_touch_type());
EXPECT_EQ(1, handler2->last_touch_id());
- EXPECT_EQ(gfx::Point(1600, 2600 - host2_y_offset),
- handler2->last_touch_location());
+ EXPECT_EQ(gfx::Point(1600, 2600), handler2->last_touch_location());
scoped_xevent.InitTouchEvent(
0, XI_TouchUpdate, 5, gfx::Point(1500, 2550), valuators);
@@ -186,8 +184,7 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
EXPECT_EQ(ui::ET_TOUCH_MOVED, handler2->last_touch_type());
EXPECT_EQ(0, handler2->last_touch_id());
- EXPECT_EQ(gfx::Point(1500, 2550 - host2_y_offset),
- handler2->last_touch_location());
+ EXPECT_EQ(gfx::Point(1500, 2550), handler2->last_touch_location());
scoped_xevent.InitTouchEvent(
0, XI_TouchUpdate, 6, gfx::Point(1600, 2650), valuators);
@@ -198,8 +195,7 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
EXPECT_EQ(ui::ET_TOUCH_MOVED, handler2->last_touch_type());
EXPECT_EQ(1, handler2->last_touch_id());
- EXPECT_EQ(gfx::Point(1600, 2650 - host2_y_offset),
- handler2->last_touch_location());
+ EXPECT_EQ(gfx::Point(1600, 2650), handler2->last_touch_location());
scoped_xevent.InitTouchEvent(
0, XI_TouchEnd, 5, gfx::Point(1500, 2550), valuators);
@@ -210,8 +206,8 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
EXPECT_EQ(ui::ET_TOUCH_RELEASED, handler2->last_touch_type());
EXPECT_EQ(0, handler2->last_touch_id());
- EXPECT_EQ(gfx::Point(1500, 2550 - host2_y_offset),
- handler2->last_touch_location());
+ EXPECT_EQ(gfx::Point(1500, 2550), handler2->last_touch_location());
+
scoped_xevent.InitTouchEvent(
0, XI_TouchEnd, 6, gfx::Point(1600, 2650), valuators);
window_tree_host1->DispatchEvent(scoped_xevent);
@@ -221,8 +217,7 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
EXPECT_EQ(ui::ET_TOUCH_RELEASED, handler2->last_touch_type());
EXPECT_EQ(1, handler2->last_touch_id());
- EXPECT_EQ(gfx::Point(1600, 2650 - host2_y_offset),
- handler2->last_touch_location());
+ EXPECT_EQ(gfx::Point(1600, 2650), handler2->last_touch_location());
handler1.reset();
handler2.reset();
« no previous file with comments | « ash/host/ash_window_tree_host_x11.cc ('k') | ash/shell.h » ('j') | ash/shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698