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

Side by Side Diff: ash/wm/immersive_fullscreen_controller_unittest.cc

Issue 405483005: Make old cursor warp mode ozone only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gn fix Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/immersive_fullscreen_controller.h" 5 #include "ash/wm/immersive_fullscreen_controller.h"
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/display/mouse_cursor_event_filter.h" 8 #include "ash/display/mouse_cursor_event_filter.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 EXPECT_TRUE(top_edge_hover_timer_running()); 537 EXPECT_TRUE(top_edge_hover_timer_running());
538 EXPECT_EQ(y_top_edge + 1, 538 EXPECT_EQ(y_top_edge + 1,
539 aura::Env::GetInstance()->last_mouse_location().y()); 539 aura::Env::GetInstance()->last_mouse_location().y());
540 540
541 // The timer should continue running if the user moves the mouse to the top 541 // The timer should continue running if the user moves the mouse to the top
542 // edge even though the mouse is warped to the secondary display. 542 // edge even though the mouse is warped to the secondary display.
543 event_generator.MoveMouseTo(x, y_top_edge); 543 event_generator.MoveMouseTo(x, y_top_edge);
544 EXPECT_TRUE(top_edge_hover_timer_running()); 544 EXPECT_TRUE(top_edge_hover_timer_running());
545 545
546 // TODO(oshima): Provide a test API to handle mouse warp more easily. 546 // TODO(oshima): Provide a test API to handle mouse warp more easily.
547 if (!MouseCursorEventFilter::IsMouseWarpInNativeCoordsEnabled()) { 547 #if defined(USE_OZONE)
548 EXPECT_NE(y_top_edge, 548 EXPECT_NE(y_top_edge, aura::Env::GetInstance()->last_mouse_location().y());
549 aura::Env::GetInstance()->last_mouse_location().y()); 549 #endif
550 }
551 550
552 // The timer should continue running if the user overshoots the top edge 551 // The timer should continue running if the user overshoots the top edge
553 // a bit. 552 // a bit.
554 event_generator.MoveMouseTo(x, y_top_edge - 2); 553 event_generator.MoveMouseTo(x, y_top_edge - 2);
555 EXPECT_TRUE(top_edge_hover_timer_running()); 554 EXPECT_TRUE(top_edge_hover_timer_running());
556 555
557 // The timer should stop running if the user overshoots the top edge by 556 // The timer should stop running if the user overshoots the top edge by
558 // a lot. 557 // a lot.
559 event_generator.MoveMouseTo(x, y_top_edge - 20); 558 event_generator.MoveMouseTo(x, y_top_edge - 20);
560 EXPECT_FALSE(top_edge_hover_timer_running()); 559 EXPECT_FALSE(top_edge_hover_timer_running());
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1067 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1069 1068
1070 // Disabling immersive fullscreen maintains the user's auto-hide selection. 1069 // Disabling immersive fullscreen maintains the user's auto-hide selection.
1071 SetEnabled(false); 1070 SetEnabled(false);
1072 window()->SetProperty(aura::client::kShowStateKey, 1071 window()->SetProperty(aura::client::kShowStateKey,
1073 ui::SHOW_STATE_NORMAL); 1072 ui::SHOW_STATE_NORMAL);
1074 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1073 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1075 } 1074 }
1076 1075
1077 } // namespase ash 1076 } // namespase ash
OLDNEW
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698