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

Side by Side Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 198413003: Enable immersive fullscreen on Windows Ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 1506
1507 aura::Window* window = widget->GetNativeWindow(); 1507 aura::Window* window = widget->GetNativeWindow();
1508 shelf->LayoutShelf(); 1508 shelf->LayoutShelf();
1509 1509
1510 gfx::Rect shelf_shown = GetShelfWidget()->GetWindowBoundsInScreen(); 1510 gfx::Rect shelf_shown = GetShelfWidget()->GetWindowBoundsInScreen();
1511 gfx::Rect bounds_shelf = window->bounds(); 1511 gfx::Rect bounds_shelf = window->bounds();
1512 EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state()); 1512 EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
1513 1513
1514 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); 1514 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
1515 shelf->LayoutShelf(); 1515 shelf->LayoutShelf();
1516 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
1516 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); 1517 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
1517 1518
1518 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); 1519 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
1519 generator.GestureEdgeSwipe(); 1520 generator.GestureEdgeSwipe();
1520 1521
1521 EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state()); 1522 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
1522 EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior()); 1523 EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
1523 1524
1524 widget->SetFullscreen(true); 1525 widget->SetFullscreen(true);
1525 wm::GetWindowState(window)->set_hide_shelf_when_fullscreen(false); 1526 wm::GetWindowState(window)->set_hide_shelf_when_fullscreen(false);
1526 shelf->UpdateVisibilityState(); 1527 shelf->UpdateVisibilityState();
1527 1528
1528 gfx::Rect bounds_fullscreen = window->bounds(); 1529 gfx::Rect bounds_fullscreen = window->bounds();
1529 EXPECT_TRUE(widget->IsFullscreen()); 1530 EXPECT_TRUE(widget->IsFullscreen());
1531 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
1530 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); 1532 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
1531 1533
1532 generator.GestureEdgeSwipe(); 1534 generator.GestureEdgeSwipe();
1533 EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state()); 1535 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
1534 EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior()); 1536 EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state());
1535 EXPECT_FALSE(widget->IsFullscreen()); 1537 EXPECT_TRUE(widget->IsFullscreen());
1536 } 1538 }
1537 1539
1538 #if defined(OS_WIN) 1540 #if defined(OS_WIN)
1539 // RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962 1541 // RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
1540 #define MAYBE_GestureDrag DISABLED_GestureDrag 1542 #define MAYBE_GestureDrag DISABLED_GestureDrag
1541 #else 1543 #else
1542 #define MAYBE_GestureDrag GestureDrag 1544 #define MAYBE_GestureDrag GestureDrag
1543 #endif 1545 #endif
1544 1546
1545 TEST_F(ShelfLayoutManagerTest, MAYBE_GestureDrag) { 1547 TEST_F(ShelfLayoutManagerTest, MAYBE_GestureDrag) {
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT); 1964 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
1963 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); 1965 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
1964 generator.ClickLeftButton(); 1966 generator.ClickLeftButton();
1965 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); 1967 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
1966 generator.ClickLeftButton(); 1968 generator.ClickLeftButton();
1967 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); 1969 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
1968 } 1970 }
1969 1971
1970 } // namespace internal 1972 } // namespace internal
1971 } // namespace ash 1973 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698