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

Unified Diff: ui/aura/root_window_unittest.cc

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 8 years 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 | « ui/aura/root_window_host_win.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_unittest.cc
diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc
index a7298e955c49dd2c8ffb719e2f382a9f0f6cc1d6..5815fc92a2b18c7600de485eb936dea26e95e06c 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -144,47 +144,6 @@ TEST_F(RootWindowTest, OnHostMouseEvent) {
EXPECT_TRUE(delegate1->mouse_event_flags() & ui::EF_IS_NON_CLIENT);
}
-#if defined(OS_WIN)
-// Temporarily disabled for windows. See crbug.com/112222.
-TEST_F(RootWindowTest, DISABLED_HideCursor) {
-#else
-TEST_F(RootWindowTest, HideCursor) {
-#endif // defined(OS_WIN)
- scoped_ptr<NonClientDelegate> delegate(new NonClientDelegate());
- const int kWindowWidth = 123;
- const int kWindowHeight = 45;
- gfx::Rect bounds(100, 200, kWindowWidth, kWindowHeight);
- scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate(
- delegate.get(), -1234, bounds, root_window()));
- aura::Window* window_ptr = &*window;
-
- root_window()->OnCursorVisibilityChanged(true);
- // Send a mouse event to window.
- gfx::Point point(101, 201);
- gfx::Point local_point;
- ui::MouseEvent event(ui::ET_MOUSE_MOVED, point, point, 0);
- root_window()->AsRootWindowHostDelegate()->OnHostMouseEvent(&event);
-
- // Location was in window.
- local_point = delegate->mouse_event_location();
- aura::Window::ConvertPointToTarget(window_ptr, root_window(), &local_point);
- EXPECT_TRUE(window->bounds().Contains(local_point));
-
- // Location is now out of window.
- root_window()->OnCursorVisibilityChanged(false);
- RunAllPendingInMessageLoop();
- local_point = delegate->mouse_event_location();
- aura::Window::ConvertPointToTarget(window_ptr, root_window(), &local_point);
- EXPECT_FALSE(window->bounds().Contains(local_point));
-
- // Location is back in window.
- root_window()->OnCursorVisibilityChanged(true);
- RunAllPendingInMessageLoop();
- local_point = delegate->mouse_event_location();
- aura::Window::ConvertPointToTarget(window_ptr, root_window(), &local_point);
- EXPECT_TRUE(window->bounds().Contains(local_point));
-}
-
// Check that we correctly track the state of the mouse buttons in response to
// button press and release events.
TEST_F(RootWindowTest, MouseButtonState) {
« no previous file with comments | « ui/aura/root_window_host_win.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698