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

Side by Side Diff: ui/display/manager/display_info_unittest.cc

Issue 2270553002: Move ash::DisplayInfo to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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
« ash/common/wm_shell.h ('K') | « ui/display/manager/display_info.cc ('k') | no next file » | 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/common/display/display_info.h" 5 #include "ui/display/manager/display_info.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace ash { 9 namespace ui {
10 namespace { 10 namespace {
11 11
12 std::string GetModeSizeInDIP(const gfx::Size& size, 12 std::string GetModeSizeInDIP(const gfx::Size& size,
13 float device_scale_factor, 13 float device_scale_factor,
14 float ui_scale, 14 float ui_scale,
15 bool is_internal) { 15 bool is_internal) {
16 scoped_refptr<ManagedDisplayMode> mode = new ManagedDisplayMode( 16 scoped_refptr<ManagedDisplayMode> mode = new ManagedDisplayMode(
17 size, 0.0 /* refresh_rate */, false /* interlaced */, false /* native */, 17 size, 0.0 /* refresh_rate */, false /* interlaced */, false /* native */,
18 ui_scale, device_scale_factor); 18 ui_scale, device_scale_factor);
19 return mode->GetSizeInDIP(is_internal).ToString(); 19 return mode->GetSizeInDIP(is_internal).ToString();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 EXPECT_EQ(10, info.input_devices()[0]); 137 EXPECT_EQ(10, info.input_devices()[0]);
138 EXPECT_EQ(11, info.input_devices()[1]); 138 EXPECT_EQ(11, info.input_devices()[1]);
139 139
140 DisplayInfo copy_info = DisplayInfo::CreateFromSpecWithID("200x100", 10); 140 DisplayInfo copy_info = DisplayInfo::CreateFromSpecWithID("200x100", 10);
141 copy_info.Copy(info); 141 copy_info.Copy(info);
142 EXPECT_EQ(2u, copy_info.input_devices().size()); 142 EXPECT_EQ(2u, copy_info.input_devices().size());
143 copy_info.ClearInputDevices(); 143 copy_info.ClearInputDevices();
144 EXPECT_EQ(0u, copy_info.input_devices().size()); 144 EXPECT_EQ(0u, copy_info.input_devices().size());
145 } 145 }
146 146
147 } // namespace ash 147 } // namespace ui
OLDNEW
« ash/common/wm_shell.h ('K') | « ui/display/manager/display_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698