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

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

Issue 1924703002: Rename gfx::Display/Screen to display::Display/Screen in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « ash/shelf/shelf_unittest.cc ('k') | ash/shelf/shelf_window_watcher.h » ('j') | 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) 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_delegate.h" 9 #include "ash/shelf/shelf_delegate.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
11 #include "ash/shelf/shelf_view.h" 11 #include "ash/shelf/shelf_view.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/test/ash_test_base.h" 13 #include "ash/test/ash_test_base.h"
14 #include "ash/test/ash_test_helper.h" 14 #include "ash/test/ash_test_helper.h"
15 #include "ash/test/shelf_test_api.h" 15 #include "ash/test/shelf_test_api.h"
16 #include "ash/test/shelf_view_test_api.h" 16 #include "ash/test/shelf_view_test_api.h"
17 #include "ash/test/test_shell_delegate.h" 17 #include "ash/test/test_shell_delegate.h"
18 #include "ash/wm/window_util.h" 18 #include "ash/wm/window_util.h"
19 #include "ui/aura/window_event_dispatcher.h" 19 #include "ui/aura/window_event_dispatcher.h"
20 #include "ui/display/display.h"
21 #include "ui/display/screen.h"
20 #include "ui/events/event_utils.h" 22 #include "ui/events/event_utils.h"
21 #include "ui/gfx/display.h"
22 #include "ui/gfx/screen.h"
23 #include "ui/views/view.h" 23 #include "ui/views/view.h"
24 #include "ui/views/widget/widget.h" 24 #include "ui/views/widget/widget.h"
25 25
26 namespace ash { 26 namespace ash {
27 27
28 namespace { 28 namespace {
29 29
30 ShelfWidget* GetShelfWidget() { 30 ShelfWidget* GetShelfWidget() {
31 return Shelf::ForPrimaryDisplay()->shelf_widget(); 31 return Shelf::ForPrimaryDisplay()->shelf_widget();
32 } 32 }
33 33
34 ShelfLayoutManager* GetShelfLayoutManager() { 34 ShelfLayoutManager* GetShelfLayoutManager() {
35 return GetShelfWidget()->shelf_layout_manager(); 35 return GetShelfWidget()->shelf_layout_manager();
36 } 36 }
37 37
38 } // namespace 38 } // namespace
39 39
40 typedef test::AshTestBase ShelfWidgetTest; 40 typedef test::AshTestBase ShelfWidgetTest;
41 41
42 void TestLauncherAlignment(aura::Window* root, 42 void TestLauncherAlignment(aura::Window* root,
43 wm::ShelfAlignment alignment, 43 wm::ShelfAlignment alignment,
44 const std::string& expected) { 44 const std::string& expected) {
45 Shell::GetInstance()->SetShelfAlignment(alignment, root); 45 Shell::GetInstance()->SetShelfAlignment(alignment, root);
46 gfx::Screen* screen = gfx::Screen::GetScreen(); 46 display::Screen* screen = display::Screen::GetScreen();
47 EXPECT_EQ(expected, 47 EXPECT_EQ(expected,
48 screen->GetDisplayNearestWindow(root).work_area().ToString()); 48 screen->GetDisplayNearestWindow(root).work_area().ToString());
49 } 49 }
50 50
51 #if defined(OS_WIN) && !defined(USE_ASH) 51 #if defined(OS_WIN) && !defined(USE_ASH)
52 // TODO(msw): Broken on Windows. http://crbug.com/584038 52 // TODO(msw): Broken on Windows. http://crbug.com/584038
53 #define MAYBE_TestAlignment DISABLED_TestAlignment 53 #define MAYBE_TestAlignment DISABLED_TestAlignment
54 #else 54 #else
55 #define MAYBE_TestAlignment TestAlignment 55 #define MAYBE_TestAlignment TestAlignment
56 #endif 56 #endif
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 454 }
455 455
456 TEST_F(ShelfWidgetTestWithDelegate, CreateLockedShelf) { 456 TEST_F(ShelfWidgetTestWithDelegate, CreateLockedShelf) {
457 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 457 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
458 TestCreateShelfWithInitialValues(wm::SHELF_ALIGNMENT_BOTTOM_LOCKED, 458 TestCreateShelfWithInitialValues(wm::SHELF_ALIGNMENT_BOTTOM_LOCKED,
459 SHELF_AUTO_HIDE_BEHAVIOR_NEVER, 459 SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
460 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); 460 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
461 } 461 }
462 462
463 } // namespace ash 463 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_unittest.cc ('k') | ash/shelf/shelf_window_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698