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

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

Issue 823703003: Cleanup: Update the path to insets and point headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: point.h Created 5 years, 12 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/gfx/display.cc ('k') | ui/gfx/geometry/dip_util.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) 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/display.h" 5 #include "ui/gfx/display.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/gfx/insets.h" 8 #include "ui/gfx/geometry/insets.h"
9 9
10 namespace { 10 namespace {
11 11
12 TEST(DisplayTest, WorkArea) { 12 TEST(DisplayTest, WorkArea) {
13 gfx::Display display(0, gfx::Rect(0, 0, 100, 100)); 13 gfx::Display display(0, gfx::Rect(0, 0, 100, 100));
14 EXPECT_EQ("0,0 100x100", display.bounds().ToString()); 14 EXPECT_EQ("0,0 100x100", display.bounds().ToString());
15 EXPECT_EQ("0,0 100x100", display.work_area().ToString()); 15 EXPECT_EQ("0,0 100x100", display.work_area().ToString());
16 16
17 display.set_work_area(gfx::Rect(3, 4, 90, 80)); 17 display.set_work_area(gfx::Rect(3, 4, 90, 80));
18 EXPECT_EQ("0,0 100x100", display.bounds().ToString()); 18 EXPECT_EQ("0,0 100x100", display.bounds().ToString());
(...skipping 21 matching lines...) Expand all
40 EXPECT_EQ("0,0 70x70", display.bounds().ToString()); 40 EXPECT_EQ("0,0 70x70", display.bounds().ToString());
41 EXPECT_EQ("10,10 50x50", display.work_area().ToString()); 41 EXPECT_EQ("10,10 50x50", display.work_area().ToString());
42 42
43 // Scale it back to 1x 43 // Scale it back to 1x
44 display.SetScaleAndBounds(1.0f, gfx::Rect(0, 0, 100, 100)); 44 display.SetScaleAndBounds(1.0f, gfx::Rect(0, 0, 100, 100));
45 EXPECT_EQ("0,0 100x100", display.bounds().ToString()); 45 EXPECT_EQ("0,0 100x100", display.bounds().ToString());
46 EXPECT_EQ("10,10 80x80", display.work_area().ToString()); 46 EXPECT_EQ("10,10 80x80", display.work_area().ToString());
47 } 47 }
48 48
49 } 49 }
OLDNEW
« no previous file with comments | « ui/gfx/display.cc ('k') | ui/gfx/geometry/dip_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698