| 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/system/web_notification/web_notification_tray.h" | 5 #include "ash/system/web_notification/web_notification_tray.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 437 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
| 438 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); | 438 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); |
| 439 gfx::Rect work_area_auto_hidden = GetPopupWorkArea(); | 439 gfx::Rect work_area_auto_hidden = GetPopupWorkArea(); |
| 440 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); | 440 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); |
| 441 | 441 |
| 442 // Put |window| into fullscreen without forcing the shelf to hide. Currently, | 442 // Put |window| into fullscreen without forcing the shelf to hide. Currently, |
| 443 // this is used by immersive fullscreen and forces the shelf to be auto | 443 // this is used by immersive fullscreen and forces the shelf to be auto |
| 444 // hidden. | 444 // hidden. |
| 445 wm::GetWindowState(window.get())->set_hide_shelf_when_fullscreen(false); | 445 wm::GetWindowState(window.get())->set_hide_shelf_when_fullscreen(false); |
| 446 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); | 446 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); |
| 447 wm::GetWindowState(window.get())->Activate(); |
| 447 RunAllPendingInMessageLoop(); | 448 RunAllPendingInMessageLoop(); |
| 448 | 449 |
| 449 // The work area for auto-hidden status of fullscreen is a bit larger | 450 // The work area for auto-hidden status of fullscreen is a bit larger |
| 450 // since it doesn't even have the 3-pixel width. | 451 // since it doesn't even have the 3-pixel width. |
| 451 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); | 452 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); |
| 452 gfx::Rect work_area_fullscreen_hidden = GetPopupWorkArea(); | 453 gfx::Rect work_area_fullscreen_hidden = GetPopupWorkArea(); |
| 453 EXPECT_EQ(work_area_auto_hidden.ToString(), | 454 EXPECT_EQ(work_area_auto_hidden.ToString(), |
| 454 work_area_fullscreen_hidden.ToString()); | 455 work_area_fullscreen_hidden.ToString()); |
| 455 | 456 |
| 456 // Move the mouse cursor at the bottom, which shows the shelf. | 457 // Move the mouse cursor at the bottom, which shows the shelf. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 478 | 479 |
| 479 // System tray is created on the primary display. The popups in the secondary | 480 // System tray is created on the primary display. The popups in the secondary |
| 480 // tray aren't affected. | 481 // tray aren't affected. |
| 481 GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); | 482 GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); |
| 482 EXPECT_GT(work_area.size().GetArea(), GetPopupWorkArea().size().GetArea()); | 483 EXPECT_GT(work_area.size().GetArea(), GetPopupWorkArea().size().GetArea()); |
| 483 EXPECT_EQ(work_area_second.ToString(), | 484 EXPECT_EQ(work_area_second.ToString(), |
| 484 GetPopupWorkAreaForTray(GetSecondaryTray()).ToString()); | 485 GetPopupWorkAreaForTray(GetSecondaryTray()).ToString()); |
| 485 } | 486 } |
| 486 | 487 |
| 487 } // namespace ash | 488 } // namespace ash |
| OLD | NEW |