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

Side by Side Diff: ash/content/keyboard_overlay/keyboard_overlay_delegate_unittest.cc

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros 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/content/keyboard_overlay/keyboard_overlay_delegate.h" 5 #include "ash/content/keyboard_overlay/keyboard_overlay_delegate.h"
6 6
7 #include "ash/shelf/shelf_types.h" 7 #include "ash/shelf/shelf_types.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 30 matching lines...) Expand all
41 GURL("chrome://keyboardoverlay/")); 41 GURL("chrome://keyboardoverlay/"));
42 // Showing the dialog creates a widget. 42 // Showing the dialog creates a widget.
43 views::Widget* widget = delegate.Show(NULL); 43 views::Widget* widget = delegate.Show(NULL);
44 EXPECT_TRUE(widget); 44 EXPECT_TRUE(widget);
45 45
46 // The widget is on the primary root window. 46 // The widget is on the primary root window.
47 EXPECT_EQ(Shell::GetPrimaryRootWindow(), 47 EXPECT_EQ(Shell::GetPrimaryRootWindow(),
48 widget->GetNativeWindow()->GetRootWindow()); 48 widget->GetNativeWindow()->GetRootWindow());
49 49
50 // The widget is horizontally centered at the bottom of the work area. 50 // The widget is horizontally centered at the bottom of the work area.
51 gfx::Rect work_area = Shell::GetScreen()->GetPrimaryDisplay().work_area(); 51 gfx::Rect work_area =
52 gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area();
52 gfx::Rect bounds = widget->GetRestoredBounds(); 53 gfx::Rect bounds = widget->GetRestoredBounds();
53 EXPECT_EQ(work_area.CenterPoint().x(), bounds.CenterPoint().x()); 54 EXPECT_EQ(work_area.CenterPoint().x(), bounds.CenterPoint().x());
54 EXPECT_EQ(work_area.bottom(), bounds.bottom()); 55 EXPECT_EQ(work_area.bottom(), bounds.bottom());
55 56
56 // Clean up. 57 // Clean up.
57 widget->CloseNow(); 58 widget->CloseNow();
58 } 59 }
59 60
60 // Tests run three times - for all possible values of shelf alignment 61 // Tests run three times - for all possible values of shelf alignment
61 INSTANTIATE_TEST_CASE_P(ShelfAlignmentAny, 62 INSTANTIATE_TEST_CASE_P(ShelfAlignmentAny,
62 KeyboardOverlayDelegateTest, 63 KeyboardOverlayDelegateTest,
63 testing::Values(SHELF_ALIGNMENT_BOTTOM, 64 testing::Values(SHELF_ALIGNMENT_BOTTOM,
64 SHELF_ALIGNMENT_LEFT, 65 SHELF_ALIGNMENT_LEFT,
65 SHELF_ALIGNMENT_RIGHT, 66 SHELF_ALIGNMENT_RIGHT,
66 SHELF_ALIGNMENT_TOP)); 67 SHELF_ALIGNMENT_TOP));
67 68
68 } // namespace ash 69 } // namespace ash
OLDNEW
« no previous file with comments | « ash/content/keyboard_overlay/keyboard_overlay_delegate.cc ('k') | ash/desktop_background/desktop_background_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698