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

Side by Side Diff: content/common/cursors/webcursor_unittest.cc

Issue 1537483003: clang/win: Fix build after https://codereview.chromium.org/1525263004/ (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 | « no previous file | no next file » | 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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 8
9 #include "base/pickle.h" 9 #include "base/pickle.h"
10 #include "content/common/cursors/webcursor.h" 10 #include "content/common/cursors/webcursor.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 291
292 WebCursor cursor; 292 WebCursor cursor;
293 cursor.SetDisplayInfo(display); 293 cursor.SetDisplayInfo(display);
294 cursor.InitFromCursorInfo(info); 294 cursor.InitFromCursorInfo(info);
295 295
296 HCURSOR windowsCursorHandle = cursor.GetPlatformCursor(); 296 HCURSOR windowsCursorHandle = cursor.GetPlatformCursor();
297 EXPECT_NE(nullptr, windowsCursorHandle); 297 EXPECT_NE(nullptr, windowsCursorHandle);
298 ICONINFO windowsIconInfo; 298 ICONINFO windowsIconInfo;
299 EXPECT_TRUE(GetIconInfo(windowsCursorHandle, &windowsIconInfo)); 299 EXPECT_TRUE(GetIconInfo(windowsCursorHandle, &windowsIconInfo));
300 EXPECT_FALSE(windowsIconInfo.fIcon); 300 EXPECT_FALSE(windowsIconInfo.fIcon);
301 EXPECT_EQ(static_cast<int>(scaleFactor * hotspotX), windowsIconInfo.xHotspot); 301 EXPECT_EQ(static_cast<DWORD>(scaleFactor * hotspotX),
302 EXPECT_EQ(static_cast<int>(scaleFactor * hotspotY), windowsIconInfo.yHotspot); 302 windowsIconInfo.xHotspot);
303 EXPECT_EQ(static_cast<DWORD>(scaleFactor * hotspotY),
304 windowsIconInfo.yHotspot);
303 } 305 }
304 306
305 TEST(WebCursorTest, WindowsCursorScaledAtHiDpi) { 307 TEST(WebCursorTest, WindowsCursorScaledAtHiDpi) {
306 ScaleCursor(2.0f, 4, 6); 308 ScaleCursor(2.0f, 4, 6);
307 ScaleCursor(1.5f, 2, 8); 309 ScaleCursor(1.5f, 2, 8);
308 ScaleCursor(1.25f, 3, 7); 310 ScaleCursor(1.25f, 3, 7);
309 } 311 }
310 #endif 312 #endif
311 313
312 } // namespace content 314 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698