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

Unified Diff: services/ui/ws/window_tree_unittest.cc

Issue 2696873002: Change OnWindowInputEvent to use display_id to find the host and update event root_location in WS. (Closed)
Patch Set: TODO Created 3 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
Index: services/ui/ws/window_tree_unittest.cc
diff --git a/services/ui/ws/window_tree_unittest.cc b/services/ui/ws/window_tree_unittest.cc
index 2fef45ed1fed5241c241d3bfa1509d1d5e305203..63edbf4e47631b359ef23df32a9b285cb5f1c548 100644
--- a/services/ui/ws/window_tree_unittest.cc
+++ b/services/ui/ws/window_tree_unittest.cc
@@ -288,7 +288,7 @@ TEST_F(WindowTreeTest, FocusOnPointer) {
EXPECT_EQ(child1, display()->GetFocusedWindow());
ASSERT_EQ(1u, wm_client()->tracker()->changes()->size())
<< SingleChangeToDescription(*wm_client()->tracker()->changes());
- EXPECT_EQ("InputEvent window=0,3 event_action=16",
+ EXPECT_EQ("InputEvent window=0,3 event_action=16 event_root_location=61,22",
ChangesToDescription1(*wm_client()->tracker()->changes())[0]);
EXPECT_TRUE(tree1_client->tracker()->changes()->empty());
}
@@ -309,7 +309,7 @@ TEST_F(WindowTreeTest, BasicInputEventTarget) {
ASSERT_EQ(2u, embed_client->tracker()->changes()->size());
EXPECT_EQ("Focused id=2,1",
ChangesToDescription1(*embed_client->tracker()->changes())[0]);
- EXPECT_EQ("InputEvent window=2,1 event_action=16",
+ EXPECT_EQ("InputEvent window=2,1 event_action=16 event_root_location=21,22",
ChangesToDescription1(*embed_client->tracker()->changes())[1]);
}
@@ -425,8 +425,10 @@ TEST_F(WindowTreeTest, StartPointerWatcherSendsOnce) {
// watcher.
DispatchEventAndAckImmediately(pointer_up);
ASSERT_EQ(1u, client->tracker()->changes()->size());
- EXPECT_EQ("InputEvent window=2,1 event_action=18 matches_pointer_watcher",
- SingleChangeToDescription(*client->tracker()->changes()));
+ EXPECT_EQ(
+ "InputEvent window=2,1 event_action=18 matches_pointer_watcher"
+ " event_root_location=25,25",
+ SingleChangeToDescription(*client->tracker()->changes()));
}
// Tests that events generated by user A are not watched by pointer watchers
@@ -648,7 +650,7 @@ TEST_F(WindowTreeTest, EventAck) {
wm_client()->tracker()->changes()->clear();
DispatchEventWithoutAck(CreateMouseMoveEvent(21, 22));
ASSERT_EQ(1u, wm_client()->tracker()->changes()->size());
- EXPECT_EQ("InputEvent window=0,3 event_action=17",
+ EXPECT_EQ("InputEvent window=0,3 event_action=17 event_root_location=21,22",
ChangesToDescription1(*wm_client()->tracker()->changes())[0]);
wm_client()->tracker()->changes()->clear();
@@ -659,7 +661,7 @@ TEST_F(WindowTreeTest, EventAck) {
// Ack the first event. That should trigger the dispatch of the second event.
AckPreviousEvent();
ASSERT_EQ(1u, wm_client()->tracker()->changes()->size());
- EXPECT_EQ("InputEvent window=0,3 event_action=17",
+ EXPECT_EQ("InputEvent window=0,3 event_action=17 event_root_location=21,22",
ChangesToDescription1(*wm_client()->tracker()->changes())[0]);
}

Powered by Google App Engine
This is Rietveld 408576698