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

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

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac compile fix Created 8 years, 2 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
OLDNEW
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 TEST(ScreenTest, GetPrimaryDisplaySize) { 11 TEST(ScreenTest, GetPrimaryDisplaySize) {
12 // We aren't actually testing that it's correct, just that it's sane. 12 // We aren't actually testing that it's correct, just that it's sane.
13 const gfx::Size size = gfx::Screen::GetPrimaryDisplay().size(); 13 const gfx::Size size = gfx::Screen::GetPrimaryDisplay(
14 gfx::Screen::BadTwoWorldsContext()).size();
14 EXPECT_GE(size.width(), 1); 15 EXPECT_GE(size.width(), 1);
15 EXPECT_GE(size.height(), 1); 16 EXPECT_GE(size.height(), 1);
16 } 17 }
17 18
18 TEST(ScreenTest, GetNumDisplays) { 19 TEST(ScreenTest, GetNumDisplays) {
19 // We aren't actually testing that it's correct, just that it's sane. 20 // We aren't actually testing that it's correct, just that it's sane.
20 EXPECT_GE(gfx::Screen::GetNumDisplays(), 1); 21 EXPECT_GE(gfx::Screen::GetNumDisplays(gfx::Screen::BadTwoWorldsContext()), 1);
21 } 22 }
22 23
23 } // namespace 24 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698