OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ui/ozone/platform/drm/common/drm_util.h" | |
dnicoara
2017/05/23 18:48:20
Out of order include.
rjkroege
2017/05/23 22:08:18
Weird that presubmit didn't catch. Fixed.
| |
6 #include "testing/gtest/include/gtest/gtest.h" | |
7 #include "ui/gfx/geometry/size.h" | |
8 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | |
9 | |
10 namespace ui { | |
11 | |
12 class DrmUtilTest : public testing::Test {}; | |
13 | |
14 TEST_F(DrmUtilTest, RoundTripEquivalence) { | |
15 DisplayMode_Params orig_params; | |
16 | |
17 orig_params.size = gfx::Size(101, 42); | |
18 orig_params.is_interlaced = true; | |
19 orig_params.refresh_rate = 3.14; | |
20 | |
21 auto udm = CreateDisplayModeFromParams(orig_params); | |
22 auto roundtrip_params = GetDisplayModeParams(*udm.get()); | |
23 | |
24 EXPECT_EQ(orig_params.size.width(), roundtrip_params.size.width()); | |
25 EXPECT_EQ(orig_params.size.height(), roundtrip_params.size.height()); | |
26 EXPECT_EQ(orig_params.is_interlaced, roundtrip_params.is_interlaced); | |
27 EXPECT_EQ(orig_params.refresh_rate, roundtrip_params.refresh_rate); | |
28 } | |
29 | |
30 } // namespace ui | |
OLD | NEW |