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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 879653002: Remove --ash-enable-tray-dragging flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/wm/gestures/shelf_gesture_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7d84adc67dc73020b133be40db0f86fed4230df7..7daade7429ff99ea4f0d091360ec70e28cff7db2 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -362,13 +362,6 @@ class ShelfLayoutManagerTest : public ash::test::AshTestBase {
return CreateTestWidgetWithParams(params);
}
- // Overridden from AshTestBase:
- void SetUp() override {
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableTrayDragging);
- test::AshTestBase::SetUp();
- }
-
void RunGestureDragTests(gfx::Vector2d);
// Turn on the lock screen.
@@ -1981,54 +1974,6 @@ TEST_F(ShelfLayoutManagerTest, ShelfAnimatesWhenGestureComplete) {
}
}
-TEST_F(ShelfLayoutManagerTest, GestureRevealsTrayBubble) {
- if (!SupportsHostWindowResize())
- return;
-
- ShelfLayoutManager* shelf = GetShelfLayoutManager();
- shelf->LayoutShelf();
-
- // Create a visible window so auto-hide behavior is enforced.
- CreateTestWidget();
-
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
- SystemTray* tray = GetSystemTray();
-
- // First, make sure the shelf is visible.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- EXPECT_FALSE(tray->HasSystemBubble());
-
- // Now, drag up on the tray to show the bubble.
- gfx::Point start = GetShelfWidget()->status_area_widget()->
- GetWindowBoundsInScreen().CenterPoint();
- gfx::Point end(start.x(), start.y() - 100);
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(10), 1);
- EXPECT_TRUE(tray->HasSystemBubble());
- tray->CloseSystemBubble();
- RunAllPendingInMessageLoop();
- EXPECT_FALSE(tray->HasSystemBubble());
-
- // Drag again, but only a small amount, and slowly. The bubble should not be
- // visible.
- end.set_y(start.y() - 30);
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(500), 100);
- EXPECT_FALSE(tray->HasSystemBubble());
-
- // Now, hide the shelf.
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
-
- // Start a drag from the bezel, and drag up to show both the shelf and the
- // tray bubble.
- start.set_y(start.y() + 100);
- end.set_y(start.y() - 400);
- generator.GestureScrollSequence(start, end,
- base::TimeDelta::FromMilliseconds(10), 1);
- EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
- EXPECT_TRUE(tray->HasSystemBubble());
-}
-
TEST_F(ShelfLayoutManagerTest, ShelfFlickerOnTrayActivation) {
ShelfLayoutManager* shelf = GetShelfLayoutManager();
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/wm/gestures/shelf_gesture_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698