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

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

Issue 1513043002: clang/win: Let remaining chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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/range/range_win_unittest.cc ('k') | win8/metro_driver/file_picker_ash.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_win.h" 5 #include "ui/gfx/screen_win.h"
6 6
7 #include <cwchar> 7 #include <cwchar>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 }; 49 };
50 50
51 TEST_F(ScreenWinTest, SingleDisplay1x) { 51 TEST_F(ScreenWinTest, SingleDisplay1x) {
52 std::vector<MONITORINFOEX> monitor_infos; 52 std::vector<MONITORINFOEX> monitor_infos;
53 monitor_infos.push_back(CreateMonitorInfo(gfx::Rect(0, 0, 1920, 1200), 53 monitor_infos.push_back(CreateMonitorInfo(gfx::Rect(0, 0, 1920, 1200),
54 gfx::Rect(0, 0, 1920, 1100), 54 gfx::Rect(0, 0, 1920, 1100),
55 L"primary")); 55 L"primary"));
56 std::vector<gfx::Display> displays = 56 std::vector<gfx::Display> displays =
57 ScreenWin::GetDisplaysForMonitorInfos(monitor_infos); 57 ScreenWin::GetDisplaysForMonitorInfos(monitor_infos);
58 58
59 ASSERT_EQ(1, displays.size()); 59 ASSERT_EQ(1u, displays.size());
60 EXPECT_EQ(gfx::Rect(0, 0, 1920, 1200), displays[0].bounds()); 60 EXPECT_EQ(gfx::Rect(0, 0, 1920, 1200), displays[0].bounds());
61 EXPECT_EQ(gfx::Rect(0, 0, 1920, 1100), displays[0].work_area()); 61 EXPECT_EQ(gfx::Rect(0, 0, 1920, 1100), displays[0].work_area());
62 } 62 }
63 63
64 TEST_F(ScreenWinTest, SingleDisplay2x) { 64 TEST_F(ScreenWinTest, SingleDisplay2x) {
65 gfx::InitDeviceScaleFactor(2.0); 65 gfx::InitDeviceScaleFactor(2.0);
66 66
67 std::vector<MONITORINFOEX> monitor_infos; 67 std::vector<MONITORINFOEX> monitor_infos;
68 monitor_infos.push_back(CreateMonitorInfo(gfx::Rect(0, 0, 1920, 1200), 68 monitor_infos.push_back(CreateMonitorInfo(gfx::Rect(0, 0, 1920, 1200),
69 gfx::Rect(0, 0, 1920, 1100), 69 gfx::Rect(0, 0, 1920, 1100),
70 L"primary")); 70 L"primary"));
71 std::vector<gfx::Display> displays = 71 std::vector<gfx::Display> displays =
72 ScreenWin::GetDisplaysForMonitorInfos(monitor_infos); 72 ScreenWin::GetDisplaysForMonitorInfos(monitor_infos);
73 73
74 ASSERT_EQ(1, displays.size()); 74 ASSERT_EQ(1u, displays.size());
75 EXPECT_EQ(gfx::Rect(0, 0, 960, 600), displays[0].bounds()); 75 EXPECT_EQ(gfx::Rect(0, 0, 960, 600), displays[0].bounds());
76 EXPECT_EQ(gfx::Rect(0, 0, 960, 550), displays[0].work_area()); 76 EXPECT_EQ(gfx::Rect(0, 0, 960, 550), displays[0].work_area());
77 } 77 }
78 78
79 } // namespace gfx 79 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/range/range_win_unittest.cc ('k') | win8/metro_driver/file_picker_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698