OLD | NEW |
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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 DisplayTestApi(display_).OnEvent(event); | 120 DisplayTestApi(display_).OnEvent(event); |
121 } | 121 } |
122 | 122 |
123 void set_window_manager_internal(WindowTree* tree, | 123 void set_window_manager_internal(WindowTree* tree, |
124 mojom::WindowManager* wm_internal) { | 124 mojom::WindowManager* wm_internal) { |
125 WindowTreeTestApi(tree).set_window_manager_internal(wm_internal); | 125 WindowTreeTestApi(tree).set_window_manager_internal(wm_internal); |
126 } | 126 } |
127 | 127 |
128 void AckPreviousEvent() { | 128 void AckPreviousEvent() { |
129 WindowManagerStateTestApi test_api(display_->GetActiveWindowManagerState()); | 129 WindowManagerStateTestApi test_api(display_->GetActiveWindowManagerState()); |
130 while (test_api.tree_awaiting_input_ack()) | 130 while (test_api.tree_awaiting_input_ack()) { |
131 test_api.tree_awaiting_input_ack()->OnWindowInputEventAck(0, true); | 131 test_api.tree_awaiting_input_ack()->OnWindowInputEventAck( |
| 132 0, mojom::EventResult::HANDLED); |
| 133 } |
132 } | 134 } |
133 | 135 |
134 void DispatchEventAndAckImmediately(const ui::Event& event) { | 136 void DispatchEventAndAckImmediately(const ui::Event& event) { |
135 DispatchEventWithoutAck(event); | 137 DispatchEventWithoutAck(event); |
136 AckPreviousEvent(); | 138 AckPreviousEvent(); |
137 } | 139 } |
138 | 140 |
139 // Creates a new window from wm_tree() and embeds a new connection in | 141 // Creates a new window from wm_tree() and embeds a new connection in |
140 // it. | 142 // it. |
141 void SetupEventTargeting(TestWindowTreeClient** out_client, | 143 void SetupEventTargeting(TestWindowTreeClient** out_client, |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 ASSERT_NE(new_opacity, unknown_window.opacity()); | 872 ASSERT_NE(new_opacity, unknown_window.opacity()); |
871 | 873 |
872 EXPECT_FALSE(tree->SetWindowOpacity( | 874 EXPECT_FALSE(tree->SetWindowOpacity( |
873 ClientWindowId(WindowIdToTransportId(window_id)), new_opacity)); | 875 ClientWindowId(WindowIdToTransportId(window_id)), new_opacity)); |
874 EXPECT_NE(new_opacity, unknown_window.opacity()); | 876 EXPECT_NE(new_opacity, unknown_window.opacity()); |
875 } | 877 } |
876 | 878 |
877 } // namespace test | 879 } // namespace test |
878 } // namespace ws | 880 } // namespace ws |
879 } // namespace mus | 881 } // namespace mus |
OLD | NEW |