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

Side by Side Diff: ui/ozone/platform/drm/common/drm_util_unittest.cc

Issue 2894523007: Use display::DisplayMode in ozone/drm/gpu (Closed)
Patch Set: review nits 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
(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"
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
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/common/drm_util.cc ('k') | ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698