Index: ash/shelf/shelf_layout_manager_unittest.cc |
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc |
index 2781e6c2c630a3bb396cf41b0e50d6640d5c5ddb..e62bcec4f37b512cde7aece5cd5410ba6901ce65 100644 |
--- a/ash/shelf/shelf_layout_manager_unittest.cc |
+++ b/ash/shelf/shelf_layout_manager_unittest.cc |
@@ -576,6 +576,22 @@ void ShelfLayoutManagerTest::RunGestureDragTests(gfx::Vector2d delta) { |
// is fullscreen status. |
widget->Close(); |
RunAllPendingInMessageLoop(); |
+ |
+ // The shelf should be shown because there are no more visible windows. |
+ EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state()); |
+ EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state()); |
+ EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior()); |
+ |
+ // Swipe-up to hide. This should have no effect because there are no visible |
+ // windows. |
+ end = below_start - delta; |
+ generator.GestureScrollSequenceWithCallback(below_start, end, |
+ base::TimeDelta::FromMilliseconds(10), kNumScrollSteps, |
+ base::Bind(&ShelfDragCallback::ProcessScroll, |
+ base::Unretained(&handler))); |
+ EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state()); |
+ EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state()); |
+ EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior()); |
} |
// Fails on Mac only. Need to be implemented. http://crbug.com/111279. |