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

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

Issue 2876013002: Add missing IWYU message_loop.h includes. (Closed)
Patch Set: fix upstream Created 3 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 "base/message_loop/message_loop.h"
8 #include "ui/display/display_switches.h" 9 #include "ui/display/display_switches.h"
9 #include "ui/display/screen.h" 10 #include "ui/display/screen.h"
10 #include "ui/views/test/scoped_views_test_helper.h" 11 #include "ui/views/test/scoped_views_test_helper.h"
11 #include "ui/views/test/views_test_base.h" 12 #include "ui/views/test/views_test_base.h"
12 13
13 namespace views { 14 namespace views {
14 namespace { 15 namespace {
15 16
16 TEST(ScreenMusTest, ConsistentDisplayInHighDPI) { 17 TEST(ScreenMusTest, ConsistentDisplayInHighDPI) {
17 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); 18 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
18 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 19 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
19 switches::kForceDeviceScaleFactor, "2"); 20 switches::kForceDeviceScaleFactor, "2");
20 ScopedViewsTestHelper test_helper; 21 ScopedViewsTestHelper test_helper;
21 display::Screen* screen = display::Screen::GetScreen(); 22 display::Screen* screen = display::Screen::GetScreen();
22 std::vector<display::Display> displays = screen->GetAllDisplays(); 23 std::vector<display::Display> displays = screen->GetAllDisplays();
23 ASSERT_FALSE(displays.empty()); 24 ASSERT_FALSE(displays.empty());
24 for (const display::Display& display : displays) { 25 for (const display::Display& display : displays) {
25 EXPECT_EQ(2.f, display.device_scale_factor()); 26 EXPECT_EQ(2.f, display.device_scale_factor());
26 EXPECT_EQ(display.work_area(), display.bounds()); 27 EXPECT_EQ(display.work_area(), display.bounds());
27 } 28 }
28 } 29 }
29 30
30 } // namespace 31 } // namespace
31 } // namespace views 32 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698