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

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: nits 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 3fcb308bec81ef182256c2d8d7349d8511fcfa52..2ab971d6cd6cd5442fbd60949347d7415cbdb6e4 100644
--- a/services/ui/ws/window_tree_unittest.cc
+++ b/services/ui/ws/window_tree_unittest.cc
@@ -287,7 +287,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());
}
@@ -308,7 +308,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]);
}
@@ -424,8 +424,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
@@ -647,7 +649,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();
@@ -658,7 +660,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