OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/wm/ash_native_cursor_manager.h" | 5 #include "ash/wm/ash_native_cursor_manager.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "ash/test/cursor_manager_test_api.h" | 9 #include "ash/test/cursor_manager_test_api.h" |
10 #include "ash/wm/image_cursors.h" | 10 #include "ash/wm/image_cursors.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 root_window->MoveCursorTo(gfx::Point(10, 10)); | 186 root_window->MoveCursorTo(gfx::Point(10, 10)); |
187 #if defined(OS_WIN) | 187 #if defined(OS_WIN) |
188 // The MoveCursor operation on Windows 8 is implemented in the viewer process | 188 // The MoveCursor operation on Windows 8 is implemented in the viewer process |
189 // which is notified by an IPC message to perform the MoveCursor operation. | 189 // which is notified by an IPC message to perform the MoveCursor operation. |
190 // We need to ensure that the IPC is delivered to the viewer process and it | 190 // We need to ensure that the IPC is delivered to the viewer process and it |
191 // the ACK is sent back from the viewer indicating that the operation | 191 // the ACK is sent back from the viewer indicating that the operation |
192 // completed. | 192 // completed. |
193 Sleep(100); | 193 Sleep(100); |
194 RunAllPendingInMessageLoop(); | 194 RunAllPendingInMessageLoop(); |
195 #endif | 195 #endif |
196 aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher(); | 196 aura::WindowTreeHost* host = root_window->GetHost(); |
197 gfx::Point mouse_location; | 197 gfx::Point mouse_location; |
198 EXPECT_TRUE(dispatcher->host()->QueryMouseLocation(&mouse_location)); | 198 EXPECT_TRUE(host->QueryMouseLocation(&mouse_location)); |
199 EXPECT_EQ("10,10", mouse_location.ToString()); | 199 EXPECT_EQ("10,10", mouse_location.ToString()); |
200 Shell::GetInstance()->cursor_manager()->DisableMouseEvents(); | 200 Shell::GetInstance()->cursor_manager()->DisableMouseEvents(); |
201 EXPECT_FALSE(dispatcher->host()->QueryMouseLocation(&mouse_location)); | 201 EXPECT_FALSE(host->QueryMouseLocation(&mouse_location)); |
202 EXPECT_EQ("0,0", mouse_location.ToString()); | 202 EXPECT_EQ("0,0", mouse_location.ToString()); |
203 } | 203 } |
204 | 204 |
205 } // namespace test | 205 } // namespace test |
206 } // namespace ash | 206 } // namespace ash |
OLD | NEW |