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

Unified Diff: chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc

Issue 2272793005: ash: Move alignment and autohide behavior from Shelf to WmShelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
index 9e5997950523da6c8120e692fcf6e83a5ce21757..4a163860a8386b0b98502acd96228d07c9454de2 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
@@ -7,6 +7,7 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/shelf/shelf.h"
#include "ash/common/shelf/shelf_widget.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h"
@@ -1017,10 +1018,10 @@ TEST_F(MultiUserWindowManagerChromeOSTest, AnimationSteps) {
EXPECT_FALSE(CoversScreen(window(1)));
EXPECT_EQ("S[A], H[B], H[C]", GetStatus());
EXPECT_EQ("A", GetOwnersOfVisibleWindowsAsString());
- Shelf* shelf = Shelf::ForPrimaryDisplay();
+ WmShelf* shelf = GetPrimaryShelf();
EXPECT_NE(SHELF_AUTO_HIDE_ALWAYS_HIDDEN, shelf->auto_hide_behavior());
EXPECT_EQ(1.0f, window(0)->layer()->GetTargetOpacity());
- ShelfWidget* shelf_widget = shelf->shelf_widget();
+ ShelfWidget* shelf_widget = shelf->GetShelfWidgetForTesting();
EXPECT_FALSE(shelf_widget->IsShelfHiddenBehindBlackBar());
// Start the animation and see that the old window is becoming invisible, the
@@ -1300,13 +1301,13 @@ TEST_F(MultiUserWindowManagerChromeOSTest, TestBlackBarCover) {
multi_user_window_manager()->SetWindowOwner(window(0), account_id_A);
multi_user_window_manager()->SetWindowOwner(window(1), account_id_B);
- Shelf* shelf = Shelf::ForPrimaryDisplay();
+ WmShelf* shelf = GetPrimaryShelf();
// Turn the use of delays and animation on.
multi_user_window_manager()->SetAnimationSpeedForTest(
chrome::MultiUserWindowManagerChromeOS::ANIMATION_SPEED_FAST);
EXPECT_NE(SHELF_AUTO_HIDE_ALWAYS_HIDDEN, shelf->auto_hide_behavior());
- ShelfWidget* shelf_widget = shelf->shelf_widget();
+ ShelfWidget* shelf_widget = shelf->GetShelfWidgetForTesting();
EXPECT_FALSE(shelf_widget->IsShelfHiddenBehindBlackBar());
// First test that with no maximized window we show/hide the shelf.
@@ -1320,7 +1321,7 @@ TEST_F(MultiUserWindowManagerChromeOSTest, TestBlackBarCover) {
AdvanceUserTransitionAnimation();
EXPECT_FALSE(shelf_widget->IsShelfHiddenBehindBlackBar());
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
+ GetPrimaryShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
msw 2016/08/24 00:18:59 nit: use |shelf|
James Cook 2016/08/24 04:19:08 Done.
// Now we maximize the windows which will cause the black overlay to show up.
wm::GetWindowState(window(0))->Maximize();

Powered by Google App Engine
This is Rietveld 408576698