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

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

Issue 575143002: Reland of: Remove deprecated cursor event filter for Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ui/ozone/platform/dri/dri_cursor.cc » ('j') | 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 event_generator.MoveMouseTo(x, y_top_edge + 1); 536 event_generator.MoveMouseTo(x, y_top_edge + 1);
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.
547 #if defined(USE_OZONE)
548 EXPECT_NE(y_top_edge, aura::Env::GetInstance()->last_mouse_location().y());
549 #endif
550
551 // The timer should continue running if the user overshoots the top edge 546 // The timer should continue running if the user overshoots the top edge
552 // a bit. 547 // a bit.
553 event_generator.MoveMouseTo(x, y_top_edge - 2); 548 event_generator.MoveMouseTo(x, y_top_edge - 2);
554 EXPECT_TRUE(top_edge_hover_timer_running()); 549 EXPECT_TRUE(top_edge_hover_timer_running());
555 550
556 // The timer should stop running if the user overshoots the top edge by 551 // The timer should stop running if the user overshoots the top edge by
557 // a lot. 552 // a lot.
558 event_generator.MoveMouseTo(x, y_top_edge - 20); 553 event_generator.MoveMouseTo(x, y_top_edge - 20);
559 EXPECT_FALSE(top_edge_hover_timer_running()); 554 EXPECT_FALSE(top_edge_hover_timer_running());
560 555
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1062 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1068 1063
1069 // Disabling immersive fullscreen maintains the user's auto-hide selection. 1064 // Disabling immersive fullscreen maintains the user's auto-hide selection.
1070 SetEnabled(false); 1065 SetEnabled(false);
1071 window()->SetProperty(aura::client::kShowStateKey, 1066 window()->SetProperty(aura::client::kShowStateKey,
1072 ui::SHOW_STATE_NORMAL); 1067 ui::SHOW_STATE_NORMAL);
1073 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1068 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1074 } 1069 }
1075 1070
1076 } // namespase ash 1071 } // namespase ash
OLDNEW
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ui/ozone/platform/dri/dri_cursor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698