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

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

Issue 109433013: Move geometric types to a separate, more lightweight target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/basictypes.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/gfx/geometry/rect.h"
8 #include "ui/gfx/skia_util.h"
9
10 namespace gfx {
11
12 TEST(RectTest, SkiaRectConversions) {
13 Rect isrc(10, 20, 30, 40);
14 RectF fsrc(10.5f, 20.5f, 30.5f, 40.5f);
15
16 SkIRect skirect = RectToSkIRect(isrc);
17 EXPECT_EQ(isrc.ToString(), SkIRectToRect(skirect).ToString());
18
19 SkRect skrect = RectToSkRect(isrc);
20 EXPECT_EQ(gfx::RectF(isrc).ToString(), SkRectToRectF(skrect).ToString());
21
22 skrect = RectFToSkRect(fsrc);
23 EXPECT_EQ(fsrc.ToString(), SkRectToRectF(skrect).ToString());
24 }
25
26 } // namespace gfx
OLDNEW
« ui/aura/aura.gyp ('K') | « ui/gfx/size_unittest.cc ('k') | ui/gfx/vector2d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698