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

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: Only set accept_events when it's false 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 da3be86bcf4d617758b85559d40fbc5a397267cd..beab0b55a0c67ba718522dd54d325fc480137898 100644
--- a/services/ui/ws/window_tree_unittest.cc
+++ b/services/ui/ws/window_tree_unittest.cc
@@ -1012,6 +1012,17 @@ TEST_F(WindowTreeTest, SetCaptureTargetsRightConnection) {
EXPECT_EQ(embed_tree, wm_state_test_api.tree_awaiting_input_ack());
}
+TEST_F(WindowTreeTest, SetAcceptEvents) {
+ TestWindowTreeClient* embed_client = nullptr;
+ WindowTree* tree = nullptr;
+ ServerWindow* window = nullptr;
+ EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &window));
+
+ EXPECT_EQ(true, window->AcceptEvents());
+ tree->SetAcceptEvents(ClientWindowIdForWindow(tree, window).id, false);
+ EXPECT_EQ(false, window->AcceptEvents());
+}
+
} // namespace test
} // namespace ws
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698