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

Unified Diff: ash/wm/immersive_fullscreen_controller_unittest.cc

Issue 100333004: Fix crash when using touch selection in immersive fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « ash/wm/immersive_fullscreen_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/immersive_fullscreen_controller_unittest.cc
diff --git a/ash/wm/immersive_fullscreen_controller_unittest.cc b/ash/wm/immersive_fullscreen_controller_unittest.cc
index ba3442bb2352df09f38b76efc7bb266ad3541785..672e97645699f72720fd961f2e43d892df525e71 100644
--- a/ash/wm/immersive_fullscreen_controller_unittest.cc
+++ b/ash/wm/immersive_fullscreen_controller_unittest.cc
@@ -574,9 +574,9 @@ TEST_F(ImmersiveFullscreenControllerTest, MouseHoveredWithoutMoving) {
EXPECT_FALSE(controller()->IsRevealed());
// 2) Test that if the mouse becomes hovered without moving because of a
- // reveal in ImmersiveFullscreenController::controller()->SetEnabled(true)
- // and there are no locks keeping the top-of-window views revealed, that mouse
- // hover does not prevent the top-of-window views from closing.
+ // reveal in ImmersiveFullscreenController::SetEnabled(true) and there are no
+ // locks keeping the top-of-window views revealed, that mouse hover does not
+ // prevent the top-of-window views from closing.
controller()->SetEnabled(false);
SetHovered(true);
EXPECT_FALSE(controller()->IsRevealed());
@@ -584,10 +584,9 @@ TEST_F(ImmersiveFullscreenControllerTest, MouseHoveredWithoutMoving) {
EXPECT_FALSE(controller()->IsRevealed());
// 3) Test that if the mouse becomes hovered without moving because of a
- // reveal in ImmersiveFullscreenController::controller()->SetEnabled(true)
- // and there is a lock keeping the top-of-window views revealed, that the
- // top-of-window views do not hide till the mouse moves off of the
- // top-of-window views.
+ // reveal in ImmersiveFullscreenController::SetEnabled(true) and there is a
+ // lock keeping the top-of-window views revealed, that the top-of-window views
+ // do not hide till the mouse moves off of the top-of-window views.
controller()->SetEnabled(false);
SetHovered(true);
lock.reset(controller()->GetRevealedLock(
@@ -650,7 +649,11 @@ TEST_F(ImmersiveFullscreenControllerTest, EndRevealViaGesture) {
EXPECT_TRUE(controller()->IsRevealed());
AttemptUnreveal(MODALITY_GESTURE);
EXPECT_FALSE(controller()->IsRevealed());
- top_container()->GetFocusManager()->ClearFocus();
+
+ // The top-of-window views should no longer have focus. Clearing focus is
+ // important because it closes focus-related popup windows like the touch
+ // selection handles.
+ EXPECT_FALSE(top_container()->HasFocus());
// If some other code is holding onto a lock, a gesture should not be able to
// end the reveal.
« no previous file with comments | « ash/wm/immersive_fullscreen_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698