summaryrefslogtreecommitdiff
path: root/chromium/ui/gfx/screen_unittest.cc
blob: 8b63ac70b52a3a493ffb110f0fee463a95ca4560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/gfx/screen.h"

#include "testing/gtest/include/gtest/gtest.h"

namespace {

TEST(ScreenTest, GetPrimaryDisplaySize) {
  // We aren't actually testing that it's correct, just that it's sane.
  const gfx::Size size = gfx::Screen::GetScreen()->GetPrimaryDisplay().size();
  EXPECT_GE(size.width(), 1);
  EXPECT_GE(size.height(), 1);
}

TEST(ScreenTest, GetNumDisplays) {
  // We aren't actually testing that it's correct, just that it's sane.
  EXPECT_GE(gfx::Screen::GetScreen()->GetNumDisplays(), 1);
}

}  // namespace