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

Unified Diff: ash/shelf/shelf_view_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: review comments 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
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view_unittest.cc
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index e97b4738ccc40674a57771edd7581a169460ea51..669927f5ab1cbeaf94c72ee59a93dcd4ee8da1d2 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -1405,7 +1405,7 @@ TEST_F(ShelfViewTest, RemovingItemClosesTooltip) {
EXPECT_FALSE(tooltip_manager->IsVisible());
// Change the shelf layout. This should not crash.
- Shelf::ForPrimaryDisplay()->SetAlignment(SHELF_ALIGNMENT_LEFT);
+ GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_LEFT);
}
// Changing the shelf alignment closes any open tooltip.
@@ -1421,7 +1421,7 @@ TEST_F(ShelfViewTest, ShelfAlignmentClosesTooltip) {
EXPECT_TRUE(tooltip_manager->IsVisible());
// Changing shelf alignment hides the tooltip.
- Shelf::ForPrimaryDisplay()->SetAlignment(SHELF_ALIGNMENT_LEFT);
+ GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_LEFT);
EXPECT_FALSE(tooltip_manager->IsVisible());
}
@@ -1759,7 +1759,7 @@ TEST_F(ShelfViewTest, CheckRipOffFromLeftShelfAlignmentWithMultiMonitor) {
ASSERT_EQ(2U, WmShell::Get()->GetAllRootWindows().size());
WmWindow* second_root = WmShell::Get()->GetAllRootWindows()[1];
- Shelf* secondary_shelf = Shelf::ForWindow(second_root);
+ WmShelf* secondary_shelf = second_root->GetRootWindowController()->GetShelf();
secondary_shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
ASSERT_EQ(SHELF_ALIGNMENT_LEFT, secondary_shelf->alignment());
@@ -1770,7 +1770,7 @@ TEST_F(ShelfViewTest, CheckRipOffFromLeftShelfAlignmentWithMultiMonitor) {
EXPECT_GT(browser_index, 0);
ShelfView* shelf_view_for_secondary =
- ShelfTestAPI(secondary_shelf).shelf_view();
+ secondary_shelf->GetShelfViewForTesting();
ShelfViewTestAPI test_api_for_secondary_shelf_view(shelf_view_for_secondary);
ShelfButton* button =
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698