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

Unified Diff: ui/aura/window_tree_host_x11_unittest.cc

Issue 219743002: x11: Move X event handling out of the message-pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r261267 Created 6 years, 9 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/aura/window_tree_host_x11.cc ('k') | ui/base/clipboard/clipboard_aurax11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0deb034af47d6bfae1bff60d97c882b6e759dc9c..8df6d244703deafce6bd2f9d71e15027419037fb 100644
--- a/ui/aura/window_tree_host_x11_unittest.cc
+++ b/ui/aura/window_tree_host_x11_unittest.cc
@@ -86,7 +86,7 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToOneRootWindow) {
// This touch is out of bounds.
scoped_xevent.InitTouchEvent(
0, XI_TouchBegin, 5, gfx::Point(1500, 2500), valuators);
- window_tree_host->Dispatch(scoped_xevent);
+ window_tree_host->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_UNKNOWN, handler->last_touch_type());
EXPECT_EQ(-1, handler->last_touch_id());
EXPECT_EQ(gfx::Point(0, 0), handler->last_touch_location());
@@ -95,21 +95,21 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToOneRootWindow) {
// Following touchs are within bounds and are passed to delegate.
scoped_xevent.InitTouchEvent(
0, XI_TouchBegin, 5, gfx::Point(1500, 1500), valuators);
- window_tree_host->Dispatch(scoped_xevent);
+ window_tree_host->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_TOUCH_PRESSED, handler->last_touch_type());
EXPECT_EQ(0, handler->last_touch_id());
EXPECT_EQ(gfx::Point(1500, 1500), handler->last_touch_location());
scoped_xevent.InitTouchEvent(
0, XI_TouchUpdate, 5, gfx::Point(1500, 1600), valuators);
- window_tree_host->Dispatch(scoped_xevent);
+ window_tree_host->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_TOUCH_MOVED, handler->last_touch_type());
EXPECT_EQ(0, handler->last_touch_id());
EXPECT_EQ(gfx::Point(1500, 1600), handler->last_touch_location());
scoped_xevent.InitTouchEvent(
0, XI_TouchEnd, 5, gfx::Point(1500, 1600), valuators);
- window_tree_host->Dispatch(scoped_xevent);
+ window_tree_host->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_TOUCH_RELEASED, handler->last_touch_type());
EXPECT_EQ(0, handler->last_touch_id());
EXPECT_EQ(gfx::Point(1500, 1600), handler->last_touch_location());
@@ -159,8 +159,8 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
ui::ScopedXI2Event scoped_xevent;
scoped_xevent.InitTouchEvent(
0, XI_TouchBegin, 5, gfx::Point(1500, 2500), valuators);
- window_tree_host1->Dispatch(scoped_xevent);
- window_tree_host2->Dispatch(scoped_xevent);
+ window_tree_host1->DispatchEvent(scoped_xevent);
+ window_tree_host2->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_UNKNOWN, handler1->last_touch_type());
EXPECT_EQ(-1, handler1->last_touch_id());
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
@@ -171,8 +171,8 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
scoped_xevent.InitTouchEvent(
0, XI_TouchBegin, 6, gfx::Point(1600, 2600), valuators);
- window_tree_host1->Dispatch(scoped_xevent);
- window_tree_host2->Dispatch(scoped_xevent);
+ window_tree_host1->DispatchEvent(scoped_xevent);
+ window_tree_host2->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_UNKNOWN, handler1->last_touch_type());
EXPECT_EQ(-1, handler1->last_touch_id());
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
@@ -183,8 +183,8 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
scoped_xevent.InitTouchEvent(
0, XI_TouchUpdate, 5, gfx::Point(1500, 2550), valuators);
- window_tree_host1->Dispatch(scoped_xevent);
- window_tree_host2->Dispatch(scoped_xevent);
+ window_tree_host1->DispatchEvent(scoped_xevent);
+ window_tree_host2->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_UNKNOWN, handler1->last_touch_type());
EXPECT_EQ(-1, handler1->last_touch_id());
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
@@ -195,8 +195,8 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
scoped_xevent.InitTouchEvent(
0, XI_TouchUpdate, 6, gfx::Point(1600, 2650), valuators);
- window_tree_host1->Dispatch(scoped_xevent);
- window_tree_host2->Dispatch(scoped_xevent);
+ window_tree_host1->DispatchEvent(scoped_xevent);
+ window_tree_host2->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_UNKNOWN, handler1->last_touch_type());
EXPECT_EQ(-1, handler1->last_touch_id());
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
@@ -207,8 +207,8 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
scoped_xevent.InitTouchEvent(
0, XI_TouchEnd, 5, gfx::Point(1500, 2550), valuators);
- window_tree_host1->Dispatch(scoped_xevent);
- window_tree_host2->Dispatch(scoped_xevent);
+ window_tree_host1->DispatchEvent(scoped_xevent);
+ window_tree_host2->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_UNKNOWN, handler1->last_touch_type());
EXPECT_EQ(-1, handler1->last_touch_id());
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
@@ -219,8 +219,8 @@ TEST_F(WindowTreeHostX11Test, DispatchTouchEventToTwoRootWindow) {
scoped_xevent.InitTouchEvent(
0, XI_TouchEnd, 6, gfx::Point(1600, 2650), valuators);
- window_tree_host1->Dispatch(scoped_xevent);
- window_tree_host2->Dispatch(scoped_xevent);
+ window_tree_host1->DispatchEvent(scoped_xevent);
+ window_tree_host2->DispatchEvent(scoped_xevent);
EXPECT_EQ(ui::ET_UNKNOWN, handler1->last_touch_type());
EXPECT_EQ(-1, handler1->last_touch_id());
EXPECT_EQ(gfx::Point(0, 0), handler1->last_touch_location());
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/base/clipboard/clipboard_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698