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

Side by Side Diff: components/mus/ws/window_tree_unittest.cc

Issue 1891413002: mash: Convert OnWindowInputEventAck to use an enum for handled status (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed a file Created 4 years, 8 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 <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
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
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
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree_client_unittest.cc ('k') | content/renderer/mus/compositor_mus_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698