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

Side by Side Diff: ash/system/web_notification/web_notification_tray_unittest.cc

Issue 149493008: Use active window if on current workspace for fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update fullscreen state tracking in workspace and only consider switchable containers for active no… Created 6 years, 10 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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698