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

Side by Side Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 1869723002: Make ShelfLayoutManagerTest.ShelfLayoutInUnifiedDesktop font config independent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2318 // would normally cause the ShelfLayoutManager to update its state. However 2318 // would normally cause the ShelfLayoutManager to update its state. However
2319 // during shutdown we want to handle this without crashing. 2319 // during shutdown we want to handle this without crashing.
2320 delete window1; 2320 delete window1;
2321 } 2321 }
2322 2322
2323 TEST_F(ShelfLayoutManagerTest, ShelfLayoutInUnifiedDesktop) { 2323 TEST_F(ShelfLayoutManagerTest, ShelfLayoutInUnifiedDesktop) {
2324 if (!SupportsMultipleDisplays()) 2324 if (!SupportsMultipleDisplays())
2325 return; 2325 return;
2326 Shell::GetInstance()->display_manager()->SetUnifiedDesktopEnabled(true); 2326 Shell::GetInstance()->display_manager()->SetUnifiedDesktopEnabled(true);
2327 2327
2328 UpdateDisplay("500x500, 500x500"); 2328 UpdateDisplay("500x400, 500x400");
James Cook 2016/04/07 15:27:09 Hooray for different width and height!
2329 2329
2330 StatusAreaWidget* status_area_widget = 2330 StatusAreaWidget* status_area_widget =
2331 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); 2331 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
2332 EXPECT_TRUE(status_area_widget->IsVisible()); 2332 EXPECT_TRUE(status_area_widget->IsVisible());
2333 // Shelf should be in the first display's area. 2333 // Shelf should be in the first display's area.
2334 // TODO: make this test more robust against changes in font, font size. 2334 gfx::Rect status_area_bounds(status_area_widget->GetWindowBoundsInScreen());
2335 EXPECT_EQ("353,453 147x47", 2335 EXPECT_TRUE(gfx::Rect(0, 0, 500, 400).Contains(status_area_bounds));
2336 status_area_widget->GetWindowBoundsInScreen().ToString()); 2336 EXPECT_EQ(gfx::Point(500, 400), status_area_bounds.bottom_right());
2337 } 2337 }
2338 2338
2339 } // namespace ash 2339 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698