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