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

Side by Side Diff: ui/views/mus/screen_mus_unittest.cc

Issue 1965073002: Rename gfx::Display to display::Display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/views/mus/screen_mus.h" 5 #include "ui/views/mus/screen_mus.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "ui/display/display_switches.h"
8 #include "ui/display/screen.h" 9 #include "ui/display/screen.h"
9 #include "ui/gfx/switches.h"
10 #include "ui/views/mus/window_manager_connection.h" 10 #include "ui/views/mus/window_manager_connection.h"
11 #include "ui/views/test/scoped_views_test_helper.h" 11 #include "ui/views/test/scoped_views_test_helper.h"
12 #include "ui/views/test/views_test_base.h" 12 #include "ui/views/test/views_test_base.h"
13 13
14 namespace views { 14 namespace views {
15 namespace { 15 namespace {
16 16
17 TEST(ScreenMusTest, ConsistentDisplayInHighDPI) { 17 TEST(ScreenMusTest, ConsistentDisplayInHighDPI) {
18 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); 18 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
19 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 19 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
20 switches::kForceDeviceScaleFactor, "2"); 20 switches::kForceDeviceScaleFactor, "2");
21 ScopedViewsTestHelper test_helper; 21 ScopedViewsTestHelper test_helper;
22 display::Screen* screen = display::Screen::GetScreen(); 22 display::Screen* screen = display::Screen::GetScreen();
23 std::vector<display::Display> displays = screen->GetAllDisplays(); 23 std::vector<display::Display> displays = screen->GetAllDisplays();
24 ASSERT_FALSE(displays.empty()); 24 ASSERT_FALSE(displays.empty());
25 for (const display::Display& display : displays) { 25 for (const display::Display& display : displays) {
26 EXPECT_EQ(2.f, display.device_scale_factor()); 26 EXPECT_EQ(2.f, display.device_scale_factor());
27 EXPECT_EQ(display.work_area(), display.bounds()); 27 EXPECT_EQ(display.work_area(), display.bounds());
28 } 28 }
29 } 29 }
30 30
31 } // namespace 31 } // namespace
32 } // namespace views 32 } // namespace views
OLDNEW
« no previous file with comments | « ui/message_center/views/popup_alignment_delegate.h ('k') | ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698