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

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

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: GetNativeScreen Created 4 years, 11 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_widget.h" 5 #include "ash/shelf/shelf_widget.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_button.h" 9 #include "ash/shelf/shelf_button.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 } // namespace 37 } // namespace
38 38
39 typedef test::AshTestBase ShelfWidgetTest; 39 typedef test::AshTestBase ShelfWidgetTest;
40 40
41 void TestLauncherAlignment(aura::Window* root, 41 void TestLauncherAlignment(aura::Window* root,
42 ShelfAlignment alignment, 42 ShelfAlignment alignment,
43 const std::string& expected) { 43 const std::string& expected) {
44 Shell::GetInstance()->SetShelfAlignment(alignment, root); 44 Shell::GetInstance()->SetShelfAlignment(alignment, root);
45 gfx::Screen* screen = gfx::Screen::GetScreenFor(root); 45 gfx::Screen* screen = gfx::Screen::GetScreen();
46 EXPECT_EQ(expected, 46 EXPECT_EQ(expected,
47 screen->GetDisplayNearestWindow(root).work_area().ToString()); 47 screen->GetDisplayNearestWindow(root).work_area().ToString());
48 } 48 }
49 49
50 TEST_F(ShelfWidgetTest, TestAlignment) { 50 TEST_F(ShelfWidgetTest, TestAlignment) {
51 Shelf* shelf = Shelf::ForPrimaryDisplay(); 51 Shelf* shelf = Shelf::ForPrimaryDisplay();
52 UpdateDisplay("400x400"); 52 UpdateDisplay("400x400");
53 ASSERT_TRUE(shelf); 53 ASSERT_TRUE(shelf);
54 { 54 {
55 SCOPED_TRACE("Single Bottom"); 55 SCOPED_TRACE("Single Bottom");
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 { 302 {
303 gfx::Point event_location(20, shelf_bounds.y() - 1); 303 gfx::Point event_location(20, shelf_bounds.y() - 1);
304 ui::TouchEvent touch(ui::ET_TOUCH_PRESSED, event_location, 0, 304 ui::TouchEvent touch(ui::ET_TOUCH_PRESSED, event_location, 0,
305 ui::EventTimeForNow()); 305 ui::EventTimeForNow());
306 EXPECT_EQ(shelf_widget->GetNativeWindow(), 306 EXPECT_EQ(shelf_widget->GetNativeWindow(),
307 targeter->FindTargetForEvent(root, &touch)); 307 targeter->FindTargetForEvent(root, &touch));
308 } 308 }
309 } 309 }
310 310
311 } // namespace ash 311 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698