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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 EXPECT_EQ(owning_tree, wm_state_test_api.tree_awaiting_input_ack()); 1005 EXPECT_EQ(owning_tree, wm_state_test_api.tree_awaiting_input_ack());
1006 AckPreviousEvent(); 1006 AckPreviousEvent();
1007 1007
1008 // Set capture from the embedded client and make sure it gets the event. 1008 // Set capture from the embedded client and make sure it gets the event.
1009 ASSERT_TRUE( 1009 ASSERT_TRUE(
1010 embed_tree->SetCapture(ClientWindowIdForWindow(embed_tree, window))); 1010 embed_tree->SetCapture(ClientWindowIdForWindow(embed_tree, window)));
1011 DispatchEventWithoutAck(CreateMouseMoveEvent(22, 23)); 1011 DispatchEventWithoutAck(CreateMouseMoveEvent(22, 23));
1012 EXPECT_EQ(embed_tree, wm_state_test_api.tree_awaiting_input_ack()); 1012 EXPECT_EQ(embed_tree, wm_state_test_api.tree_awaiting_input_ack());
1013 } 1013 }
1014 1014
1015 TEST_F(WindowTreeTest, SetAcceptEvents) {
1016 TestWindowTreeClient* embed_client = nullptr;
1017 WindowTree* tree = nullptr;
1018 ServerWindow* window = nullptr;
1019 EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&embed_client, &tree, &window));
1020
1021 EXPECT_EQ(true, window->AcceptEvents());
1022 tree->SetAcceptEvents(ClientWindowIdForWindow(tree, window).id, false);
1023 EXPECT_EQ(false, window->AcceptEvents());
1024 }
1025
1015 } // namespace test 1026 } // namespace test
1016 } // namespace ws 1027 } // namespace ws
1017 } // namespace ui 1028 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698