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

Side by Side Diff: ui/gfx/screen_unittest.cc

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/screen_mac.mm ('k') | ui/gfx/screen_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
7 8
8 namespace { 9 namespace {
9 10
10 typedef testing::Test ScreenTest; 11 typedef testing::Test ScreenTest;
11 12
12 TEST_F(ScreenTest, GetPrimaryMonitorSize) { 13 TEST_F(ScreenTest, GetPrimaryMonitorSize) {
13 // 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.
14 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); 15 const gfx::Size size = gfx::Screen::GetPrimaryMonitor().size();
15 EXPECT_GE(size.width(), 1); 16 EXPECT_GE(size.width(), 1);
16 EXPECT_GE(size.height(), 1); 17 EXPECT_GE(size.height(), 1);
17 } 18 }
18 19
19 TEST_F(ScreenTest, GetNumMonitors) { 20 TEST_F(ScreenTest, GetNumMonitors) {
20 // 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.
21 EXPECT_GE(gfx::Screen::GetNumMonitors(), 1); 22 EXPECT_GE(gfx::Screen::GetNumMonitors(), 1);
22 } 23 }
23 24
24 } // namespace 25 } // namespace
OLDNEW
« no previous file with comments | « ui/gfx/screen_mac.mm ('k') | ui/gfx/screen_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698