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

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

Issue 1543183002: Switch to standard integer types in ui/gfx/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/skia_util.cc ('k') | ui/gfx/switches.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/basictypes.h"
6 #include "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/gfx/geometry/rect.h" 6 #include "ui/gfx/geometry/rect.h"
8 #include "ui/gfx/skia_util.h" 7 #include "ui/gfx/skia_util.h"
9 8
10 namespace gfx { 9 namespace gfx {
11 10
12 TEST(RectTest, SkiaRectConversions) { 11 TEST(RectTest, SkiaRectConversions) {
13 Rect isrc(10, 20, 30, 40); 12 Rect isrc(10, 20, 30, 40);
14 RectF fsrc(10.5f, 20.5f, 30.5f, 40.5f); 13 RectF fsrc(10.5f, 20.5f, 30.5f, 40.5f);
15 14
16 SkIRect skirect = RectToSkIRect(isrc); 15 SkIRect skirect = RectToSkIRect(isrc);
17 EXPECT_EQ(isrc.ToString(), SkIRectToRect(skirect).ToString()); 16 EXPECT_EQ(isrc.ToString(), SkIRectToRect(skirect).ToString());
18 17
19 SkRect skrect = RectToSkRect(isrc); 18 SkRect skrect = RectToSkRect(isrc);
20 EXPECT_EQ(gfx::RectF(isrc).ToString(), SkRectToRectF(skrect).ToString()); 19 EXPECT_EQ(gfx::RectF(isrc).ToString(), SkRectToRectF(skrect).ToString());
21 20
22 skrect = RectFToSkRect(fsrc); 21 skrect = RectFToSkRect(fsrc);
23 EXPECT_EQ(fsrc.ToString(), SkRectToRectF(skrect).ToString()); 22 EXPECT_EQ(fsrc.ToString(), SkRectToRectF(skrect).ToString());
24 } 23 }
25 24
26 } // namespace gfx 25 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/skia_util.cc ('k') | ui/gfx/switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698