OLD | NEW |
---|---|
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/focus_cycler.h" | 9 #include "ash/focus_cycler.h" |
10 #include "ash/public/cpp/config.h" | 10 #include "ash/public/cpp/config.h" |
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1552 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); | 1552 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); |
1553 wm::GetWindowState(window_two)->Restore(); | 1553 wm::GetWindowState(window_two)->Restore(); |
1554 | 1554 |
1555 // With the flag off, shelf no longer auto-hides. | 1555 // With the flag off, shelf no longer auto-hides. |
1556 widget_one->Activate(); | 1556 widget_one->Activate(); |
1557 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); | 1557 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
1558 wm::GetWindowState(window_two) | 1558 wm::GetWindowState(window_two) |
1559 ->set_autohide_shelf_when_maximized_or_fullscreen(false); | 1559 ->set_autohide_shelf_when_maximized_or_fullscreen(false); |
1560 widget_two->Activate(); | 1560 widget_two->Activate(); |
1561 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); | 1561 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
1562 | |
1563 wm::GetWindowState(window_two) | |
1564 ->set_autohide_shelf_when_maximized_or_fullscreen(true); | |
1565 window_two->SetProperty(aura::client::kAlwaysOnTopKey, true); | |
oshima
2017/06/30 00:04:08
please test if the window is in the always on cont
Muyuan
2017/06/30 00:28:23
Done.
| |
1566 widget_two->Maximize(); | |
1567 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); | |
oshima
2017/06/30 00:04:08
Can you also check if the workspace state is in ma
Muyuan
2017/06/30 00:28:23
Done.
| |
1562 } | 1568 } |
1563 | 1569 |
1564 TEST_F(ShelfLayoutManagerTest, ShelfFlickerOnTrayActivation) { | 1570 TEST_F(ShelfLayoutManagerTest, ShelfFlickerOnTrayActivation) { |
1565 // TODO: investigate failure in mash, http://crbug.com/695686. | 1571 // TODO: investigate failure in mash, http://crbug.com/695686. |
1566 if (Shell::GetAshConfig() == Config::MASH) | 1572 if (Shell::GetAshConfig() == Config::MASH) |
1567 return; | 1573 return; |
1568 | 1574 |
1569 Shelf* shelf = GetPrimaryShelf(); | 1575 Shelf* shelf = GetPrimaryShelf(); |
1570 | 1576 |
1571 // Create a visible window so auto-hide behavior is enforced. | 1577 // Create a visible window so auto-hide behavior is enforced. |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1875 // Open keyboard in sticky mode. | 1881 // Open keyboard in sticky mode. |
1876 kb_controller->ShowKeyboard(true); | 1882 kb_controller->ShowKeyboard(true); |
1877 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); | 1883 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); |
1878 | 1884 |
1879 // Work area should be changed. | 1885 // Work area should be changed. |
1880 EXPECT_NE(orig_work_area, | 1886 EXPECT_NE(orig_work_area, |
1881 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); | 1887 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); |
1882 } | 1888 } |
1883 | 1889 |
1884 } // namespace ash | 1890 } // namespace ash |
OLD | NEW |