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

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

Issue 2118383002: mus: Disregard windows that explicitly set can_accept_events to be false when sending events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check if can_accept_events setting has changed; change names Created 4 years, 5 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 028ba9be9d9eb4bfe3d177b3e41b994031771546..6cb2337b779b0da9fde980d752606146cdd158d1 100644
--- a/services/ui/ws/window_tree_unittest.cc
+++ b/services/ui/ws/window_tree_unittest.cc
@@ -1245,6 +1245,17 @@ TEST_F(WindowTreeTest, InvalidMoveLoopStillAcksAttempt) {
SingleChangeToDescription(*embed_client->tracker()->changes()));
}
+TEST_F(WindowTreeTest, SetCanAcceptEvents) {
+ TestWindowTreeClient* embed_client = nullptr;
+ WindowTree* tree = nullptr;
+ ServerWindow* window = nullptr;
+ EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &window));
+
+ EXPECT_EQ(true, window->can_accept_events());
+ tree->SetCanAcceptEvents(ClientWindowIdForWindow(tree, window).id, false);
+ EXPECT_EQ(false, window->can_accept_events());
+}
+
} // namespace test
} // namespace ws
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698