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

Side by Side Diff: services/ui/ws/cursor_unittest.cc

Issue 2712963003: mustash: Use ui::chromeos::EventRewriter in mus (Closed)
Patch Set: Fix compile issues Created 3 years, 10 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
« no previous file with comments | « no previous file | services/ui/ws/display.h » ('j') | services/ui/ws/display.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 return w; 88 return w;
89 } 89 }
90 90
91 void MoveCursorTo(const gfx::Point& p) { 91 void MoveCursorTo(const gfx::Point& p) {
92 DisplayManager* display_manager = window_server()->display_manager(); 92 DisplayManager* display_manager = window_server()->display_manager();
93 ASSERT_EQ(1u, display_manager->displays().size()); 93 ASSERT_EQ(1u, display_manager->displays().size());
94 Display* display = *display_manager->displays().begin(); 94 Display* display = *display_manager->displays().begin();
95 WindowManagerDisplayRoot* active_display_root = 95 WindowManagerDisplayRoot* active_display_root =
96 display->GetActiveWindowManagerDisplayRoot(); 96 display->GetActiveWindowManagerDisplayRoot();
97 ASSERT_TRUE(active_display_root); 97 ASSERT_TRUE(active_display_root);
98 static_cast<PlatformDisplayDelegate*>(display)->OnEvent(PointerEvent( 98
99 DisplayTestApi display_test_api(display);
100 display_test_api.OnEvent(PointerEvent(
99 MouseEvent(ET_MOUSE_MOVED, p, p, base::TimeTicks(), 0, 0))); 101 MouseEvent(ET_MOUSE_MOVED, p, p, base::TimeTicks(), 0, 0)));
100 WindowManagerState* wms = active_display_root->window_manager_state(); 102 WindowManagerState* wms = active_display_root->window_manager_state();
101 wms->OnEventAck(wms->window_tree(), mojom::EventResult::HANDLED); 103 wms->OnEventAck(wms->window_tree(), mojom::EventResult::HANDLED);
102 } 104 }
103 105
104 private: 106 private:
105 WindowServerTestHelper ws_test_helper_; 107 WindowServerTestHelper ws_test_helper_;
106 TestScreenManager screen_manager_; 108 TestScreenManager screen_manager_;
107 DISALLOW_COPY_AND_ASSIGN(CursorTest); 109 DISALLOW_COPY_AND_ASSIGN(CursorTest);
108 }; 110 };
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 MoveCursorTo(gfx::Point(15, 15)); 184 MoveCursorTo(gfx::Point(15, 15));
183 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, cursor()); 185 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, cursor());
184 186
185 win->SetBounds(gfx::Rect(0, 0, 30, 30)); 187 win->SetBounds(gfx::Rect(0, 0, 30, 30));
186 EXPECT_EQ(mojom::Cursor::COPY, cursor()); 188 EXPECT_EQ(mojom::Cursor::COPY, cursor());
187 } 189 }
188 190
189 } // namespace test 191 } // namespace test
190 } // namespace ws 192 } // namespace ws
191 } // namespace ui 193 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | services/ui/ws/display.h » ('j') | services/ui/ws/display.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698