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

Unified Diff: ui/gfx/monitor_unittest.cc

Issue 10540091: Rename gfx::Monitor to gfx::Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/monitor.cc ('k') | ui/gfx/screen.h » ('j') | ui/gfx/screen.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/monitor_unittest.cc
diff --git a/ui/gfx/monitor_unittest.cc b/ui/gfx/monitor_unittest.cc
deleted file mode 100644
index ae129d47891c89a3f11ebd336956c1ea402ee70a..0000000000000000000000000000000000000000
--- a/ui/gfx/monitor_unittest.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// 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/monitor.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/gfx/insets.h"
-
-namespace {
-
-TEST(MonitorTest, WorkArea) {
- gfx::Monitor monitor(0, gfx::Rect(0, 0, 100, 100));
- EXPECT_EQ("0,0 100x100", monitor.bounds().ToString());
- EXPECT_EQ("0,0 100x100", monitor.work_area().ToString());
-
- monitor.set_work_area(gfx::Rect(3, 4, 90, 80));
- EXPECT_EQ("0,0 100x100", monitor.bounds().ToString());
- EXPECT_EQ("3,4 90x80", monitor.work_area().ToString());
-
- monitor.SetScaleAndBounds(1.0f, gfx::Rect(10, 20, 50, 50));
- EXPECT_EQ("0,0 50x50", monitor.bounds().ToString());
- EXPECT_EQ("3,4 40x30", monitor.work_area().ToString());
-
- monitor.SetSize(gfx::Size(200, 200));
- EXPECT_EQ("3,4 190x180", monitor.work_area().ToString());
-
- monitor.UpdateWorkAreaFromInsets(gfx::Insets(3, 4, 5, 6));
- EXPECT_EQ("4,3 190x192", monitor.work_area().ToString());
-}
-
-TEST(MonitorTest, Scale) {
- gfx::Monitor monitor(0, gfx::Rect(0, 0, 100, 100));
- monitor.set_work_area(gfx::Rect(10, 10, 80, 80));
- EXPECT_EQ("0,0 100x100", monitor.bounds().ToString());
- EXPECT_EQ("10,10 80x80", monitor.work_area().ToString());
-
- // Scale it back to 2x
- monitor.SetScaleAndBounds(2.0f, gfx::Rect(0, 0, 140, 140));
- EXPECT_EQ("0,0 70x70", monitor.bounds().ToString());
- EXPECT_EQ("10,10 50x50", monitor.work_area().ToString());
-
- // Scale it back to 1x
- monitor.SetScaleAndBounds(1.0f, gfx::Rect(0, 0, 100, 100));
- EXPECT_EQ("0,0 100x100", monitor.bounds().ToString());
- EXPECT_EQ("10,10 80x80", monitor.work_area().ToString());
-}
-
-}
« no previous file with comments | « ui/gfx/monitor.cc ('k') | ui/gfx/screen.h » ('j') | ui/gfx/screen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698