| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |