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/display/display_info.h" | 5 #include "ash/display/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 ash { |
10 namespace internal { | |
11 | 10 |
12 typedef testing::Test DisplayInfoTest; | 11 typedef testing::Test DisplayInfoTest; |
13 | 12 |
14 TEST_F(DisplayInfoTest, CreateFromSpec) { | 13 TEST_F(DisplayInfoTest, CreateFromSpec) { |
15 DisplayInfo info = DisplayInfo::CreateFromSpecWithID("200x100", 10); | 14 DisplayInfo info = DisplayInfo::CreateFromSpecWithID("200x100", 10); |
16 EXPECT_EQ(10, info.id()); | 15 EXPECT_EQ(10, info.id()); |
17 EXPECT_EQ("0,0 200x100", info.bounds_in_native().ToString()); | 16 EXPECT_EQ("0,0 200x100", info.bounds_in_native().ToString()); |
18 EXPECT_EQ("200x100", info.size_in_pixel().ToString()); | 17 EXPECT_EQ("200x100", info.size_in_pixel().ToString()); |
19 EXPECT_EQ(gfx::Display::ROTATE_0, info.rotation()); | 18 EXPECT_EQ(gfx::Display::ROTATE_0, info.rotation()); |
20 EXPECT_EQ("0,0,0,0", info.overscan_insets_in_dip().ToString()); | 19 EXPECT_EQ("0,0,0,0", info.overscan_insets_in_dip().ToString()); |
(...skipping 30 matching lines...) Expand all Loading... |
51 EXPECT_EQ("300x200", info.display_modes()[0].size.ToString()); | 50 EXPECT_EQ("300x200", info.display_modes()[0].size.ToString()); |
52 EXPECT_EQ("200x200", info.display_modes()[1].size.ToString()); | 51 EXPECT_EQ("200x200", info.display_modes()[1].size.ToString()); |
53 EXPECT_EQ("100x100", info.display_modes()[2].size.ToString()); | 52 EXPECT_EQ("100x100", info.display_modes()[2].size.ToString()); |
54 EXPECT_EQ(59.9f, info.display_modes()[1].refresh_rate); | 53 EXPECT_EQ(59.9f, info.display_modes()[1].refresh_rate); |
55 EXPECT_EQ(60.0f, info.display_modes()[2].refresh_rate); | 54 EXPECT_EQ(60.0f, info.display_modes()[2].refresh_rate); |
56 EXPECT_TRUE(info.display_modes()[0].native); | 55 EXPECT_TRUE(info.display_modes()[0].native); |
57 EXPECT_FALSE(info.display_modes()[1].native); | 56 EXPECT_FALSE(info.display_modes()[1].native); |
58 EXPECT_FALSE(info.display_modes()[2].native); | 57 EXPECT_FALSE(info.display_modes()[2].native); |
59 } | 58 } |
60 | 59 |
61 } // namespace internal | |
62 } // namespace ash | 60 } // namespace ash |
OLD | NEW |