Revert of Reland debugging for ipc related crash. (patchset #1 id:1 of https://codere...
[chromium-blink-merge.git] / ui / gfx / skrect_conversion_unittest.cc
blobef116c2a451192faab41079eb88ea87564c4bacf
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.
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"
10 namespace gfx {
12 TEST(RectTest, SkiaRectConversions) {
13 Rect isrc(10, 20, 30, 40);
14 RectF fsrc(10.5f, 20.5f, 30.5f, 40.5f);
16 SkIRect skirect = RectToSkIRect(isrc);
17 EXPECT_EQ(isrc.ToString(), SkIRectToRect(skirect).ToString());
19 SkRect skrect = RectToSkRect(isrc);
20 EXPECT_EQ(gfx::RectF(isrc).ToString(), SkRectToRectF(skrect).ToString());
22 skrect = RectFToSkRect(fsrc);
23 EXPECT_EQ(fsrc.ToString(), SkRectToRectF(skrect).ToString());
26 } // namespace gfx