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

Side by Side Diff: ui/display/display_unittest.cc

Issue 1965073002: Rename gfx::Display to display::Display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « ui/display/display_switches.cc ('k') | ui/display/manager/display_layout.h » ('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) 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/display/display.h" 5 #include "ui/display/display.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/display/display_switches.h"
9 #include "ui/gfx/geometry/insets.h" 10 #include "ui/gfx/geometry/insets.h"
10 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
12 #include "ui/gfx/switches.h"
13 13
14 namespace display { 14 namespace display {
15 15
16 TEST(DisplayTest, WorkArea) { 16 TEST(DisplayTest, WorkArea) {
17 Display display(0, gfx::Rect(0, 0, 100, 100)); 17 Display display(0, gfx::Rect(0, 0, 100, 100));
18 EXPECT_EQ("0,0 100x100", display.bounds().ToString()); 18 EXPECT_EQ("0,0 100x100", display.bounds().ToString());
19 EXPECT_EQ("0,0 100x100", display.work_area().ToString()); 19 EXPECT_EQ("0,0 100x100", display.work_area().ToString());
20 20
21 display.set_work_area(gfx::Rect(3, 4, 90, 80)); 21 display.set_work_area(gfx::Rect(3, 4, 90, 80));
22 EXPECT_EQ("0,0 100x100", display.bounds().ToString()); 22 EXPECT_EQ("0,0 100x100", display.bounds().ToString());
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Look ma, no value! 57 // Look ma, no value!
58 base::CommandLine::ForCurrentProcess()->AppendSwitch( 58 base::CommandLine::ForCurrentProcess()->AppendSwitch(
59 switches::kForceDeviceScaleFactor); 59 switches::kForceDeviceScaleFactor);
60 60
61 EXPECT_EQ(1, Display::GetForcedDeviceScaleFactor()); 61 EXPECT_EQ(1, Display::GetForcedDeviceScaleFactor());
62 Display::ResetForceDeviceScaleFactorForTesting(); 62 Display::ResetForceDeviceScaleFactorForTesting();
63 } 63 }
64 64
65 } // namespace display 65 } // namespace display
OLDNEW
« no previous file with comments | « ui/display/display_switches.cc ('k') | ui/display/manager/display_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698