OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gfx/screen.h" | 5 #include "ui/gfx/screen.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
11 typedef testing::Test ScreenTest; | 11 typedef testing::Test ScreenTest; |
12 | 12 |
13 TEST_F(ScreenTest, GetPrimaryMonitorSize) { | 13 TEST_F(ScreenTest, GetPrimaryDisplaySize) { |
14 // We aren't actually testing that it's correct, just that it's sane. | 14 // We aren't actually testing that it's correct, just that it's sane. |
15 const gfx::Size size = gfx::Screen::GetPrimaryMonitor().size(); | 15 const gfx::Size size = gfx::Screen::GetPrimaryDisplay().size(); |
16 EXPECT_GE(size.width(), 1); | 16 EXPECT_GE(size.width(), 1); |
17 EXPECT_GE(size.height(), 1); | 17 EXPECT_GE(size.height(), 1); |
18 } | 18 } |
19 | 19 |
20 TEST_F(ScreenTest, GetNumMonitors) { | 20 TEST_F(ScreenTest, GetNumDisplays) { |
21 // We aren't actually testing that it's correct, just that it's sane. | 21 // We aren't actually testing that it's correct, just that it's sane. |
22 EXPECT_GE(gfx::Screen::GetNumMonitors(), 1); | 22 EXPECT_GE(gfx::Screen::GetNumDisplays(), 1); |
23 } | 23 } |
24 | 24 |
25 } // namespace | 25 } // namespace |
OLD | NEW |