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

Unified Diff: components/mus/ws/window_tree_unittest.cc

Issue 2057793002: Reorganize event mojom files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typos in comments. Created 4 years, 6 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
« no previous file with comments | « components/mus/ws/window_tree.cc ('k') | content/renderer/mus/compositor_mus_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_tree_unittest.cc
diff --git a/components/mus/ws/window_tree_unittest.cc b/components/mus/ws/window_tree_unittest.cc
index 2bf859857eb81ff99d34f73869655adea419a08d..1dedb4e68f7810a559bf49e3a6d15378a54901da 100644
--- a/components/mus/ws/window_tree_unittest.cc
+++ b/components/mus/ws/window_tree_unittest.cc
@@ -87,7 +87,7 @@ ServerWindow* GetCaptureWindow(Display* display) {
return display->GetActiveWindowManagerState()->capture_window();
}
-mojom::EventMatcherPtr CreateEventMatcher(mojom::EventType type) {
+mojom::EventMatcherPtr CreateEventMatcher(ui::mojom::EventType type) {
mojom::EventMatcherPtr matcher = mojom::EventMatcher::New();
matcher->type_matcher = mojom::EventTypeMatcher::New();
matcher->type_matcher->type = type;
@@ -302,7 +302,7 @@ TEST_F(WindowTreeTest, SetEventObserver) {
// Create an observer for pointer-down events.
WindowTreeTestApi(tree).SetEventObserver(
- CreateEventMatcher(mojom::EventType::POINTER_DOWN), 111u);
+ CreateEventMatcher(ui::mojom::EventType::POINTER_DOWN), 111u);
// Pointer-down events are sent to the client.
DispatchEventAndAckImmediately(pointer_down);
@@ -328,7 +328,7 @@ TEST_F(WindowTreeTest, SetEventObserverNonMatching) {
// Create an observer for pointer-down events.
WindowTreeTestApi(tree).SetEventObserver(
- CreateEventMatcher(mojom::EventType::POINTER_DOWN), 111u);
+ CreateEventMatcher(ui::mojom::EventType::POINTER_DOWN), 111u);
// Pointer-up events are not sent to the client, since they don't match.
DispatchEventAndAckImmediately(CreatePointerUpEvent(5, 5));
@@ -347,7 +347,7 @@ TEST_F(WindowTreeTest, SetEventObserverSendsOnce) {
// Create an observer for pointer-up events (which do not cause focus
// changes).
WindowTreeTestApi(tree).SetEventObserver(
- CreateEventMatcher(mojom::EventType::POINTER_UP), 111u);
+ CreateEventMatcher(ui::mojom::EventType::POINTER_UP), 111u);
// Create an event inside the bounds of the client.
ui::PointerEvent pointer_up = CreatePointerUpEvent(25, 25);
@@ -370,9 +370,10 @@ TEST_F(WindowTreeTest, SetEventObserverWrongUser) {
// Set event observers on both the wm tree and the other user's tree.
WindowTreeTestApi(wm_tree()).SetEventObserver(
- CreateEventMatcher(mojom::EventType::POINTER_UP), 111u);
+ CreateEventMatcher(ui::mojom::EventType::POINTER_UP), 111u);
WindowTreeTestApi(other_tree)
- .SetEventObserver(CreateEventMatcher(mojom::EventType::POINTER_UP), 222u);
+ .SetEventObserver(CreateEventMatcher(ui::mojom::EventType::POINTER_UP),
+ 222u);
// An event is observed by the wm tree, but not by the other user's tree.
DispatchEventAndAckImmediately(CreatePointerUpEvent(5, 5));
@@ -385,13 +386,13 @@ TEST_F(WindowTreeTest, SetEventObserverWrongUser) {
// Tests that an event observer cannot observe keystrokes.
TEST_F(WindowTreeTest, SetEventObserverKeyEventsDisallowed) {
WindowTreeTestApi(wm_tree()).SetEventObserver(
- CreateEventMatcher(mojom::EventType::KEY_PRESSED), 111u);
+ CreateEventMatcher(ui::mojom::EventType::KEY_PRESSED), 111u);
ui::KeyEvent key_pressed(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE);
DispatchEventAndAckImmediately(key_pressed);
EXPECT_EQ(0u, wm_client()->tracker()->changes()->size());
WindowTreeTestApi(wm_tree()).SetEventObserver(
- CreateEventMatcher(mojom::EventType::KEY_RELEASED), 222u);
+ CreateEventMatcher(ui::mojom::EventType::KEY_RELEASED), 222u);
ui::KeyEvent key_released(ui::ET_KEY_RELEASED, ui::VKEY_A, ui::EF_NONE);
DispatchEventAndAckImmediately(key_released);
EXPECT_EQ(0u, wm_client()->tracker()->changes()->size());
« no previous file with comments | « components/mus/ws/window_tree.cc ('k') | content/renderer/mus/compositor_mus_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698