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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 427 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
428 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); | 428 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); |
429 gfx::Rect work_area_auto_hidden = GetPopupWorkArea(); | 429 gfx::Rect work_area_auto_hidden = GetPopupWorkArea(); |
430 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); | 430 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); |
431 | 431 |
432 // Put |window| into fullscreen without forcing the shelf to hide. Currently, | 432 // Put |window| into fullscreen without forcing the shelf to hide. Currently, |
433 // this is used by immersive fullscreen and forces the shelf to be auto | 433 // this is used by immersive fullscreen and forces the shelf to be auto |
434 // hidden. | 434 // hidden. |
435 wm::GetWindowState(window.get())->set_hide_shelf_when_fullscreen(false); | 435 wm::GetWindowState(window.get())->set_hide_shelf_when_fullscreen(false); |
436 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); | 436 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); |
| 437 wm::GetWindowState(window.get())->Activate(); |
437 RunAllPendingInMessageLoop(); | 438 RunAllPendingInMessageLoop(); |
438 | 439 |
439 // The work area for auto-hidden status of fullscreen is a bit larger | 440 // The work area for auto-hidden status of fullscreen is a bit larger |
440 // since it doesn't even have the 3-pixel width. | 441 // since it doesn't even have the 3-pixel width. |
441 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); | 442 EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); |
442 gfx::Rect work_area_fullscreen_hidden = GetPopupWorkArea(); | 443 gfx::Rect work_area_fullscreen_hidden = GetPopupWorkArea(); |
443 EXPECT_EQ(work_area_auto_hidden.ToString(), | 444 EXPECT_EQ(work_area_auto_hidden.ToString(), |
444 work_area_fullscreen_hidden.ToString()); | 445 work_area_fullscreen_hidden.ToString()); |
445 | 446 |
446 // Move the mouse cursor at the bottom, which shows the shelf. | 447 // Move the mouse cursor at the bottom, which shows the shelf. |
(...skipping 21 matching lines...) Expand all Loading... |
468 | 469 |
469 // System tray is created on the primary display. The popups in the secondary | 470 // System tray is created on the primary display. The popups in the secondary |
470 // tray aren't affected. | 471 // tray aren't affected. |
471 GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); | 472 GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); |
472 EXPECT_GT(work_area.size().GetArea(), GetPopupWorkArea().size().GetArea()); | 473 EXPECT_GT(work_area.size().GetArea(), GetPopupWorkArea().size().GetArea()); |
473 EXPECT_EQ(work_area_second.ToString(), | 474 EXPECT_EQ(work_area_second.ToString(), |
474 GetPopupWorkAreaForTray(GetSecondaryTray()).ToString()); | 475 GetPopupWorkAreaForTray(GetSecondaryTray()).ToString()); |
475 } | 476 } |
476 | 477 |
477 } // namespace ash | 478 } // namespace ash |
OLD | NEW |