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

Unified Diff: ui/gfx/geometry/rect_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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/geometry/rect_unittest.cc
diff --git a/ui/gfx/rect_unittest.cc b/ui/gfx/geometry/rect_unittest.cc
similarity index 98%
rename from ui/gfx/rect_unittest.cc
rename to ui/gfx/geometry/rect_unittest.cc
index 31a156b79106e295850a99acb2035296a22c25f3..5fcd76b706bc02399f276782c45f3929c1e33318 100644
--- a/ui/gfx/rect_unittest.cc
+++ b/ui/gfx/geometry/rect_unittest.cc
@@ -1,14 +1,17 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <limits>
+
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/rect_conversions.h"
-#include "ui/gfx/skia_util.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/rect_conversions.h"
-#include <limits>
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
namespace gfx {
@@ -414,20 +417,6 @@ TEST(RectTest, SharesEdgeWith) {
EXPECT_FALSE(r.SharesEdgeWith(just_right_no_edge));
}
-TEST(RectTest, SkiaRectConversions) {
- Rect isrc(10, 20, 30, 40);
- RectF fsrc(10.5f, 20.5f, 30.5f, 40.5f);
-
- SkIRect skirect = RectToSkIRect(isrc);
- EXPECT_EQ(isrc.ToString(), SkIRectToRect(skirect).ToString());
-
- SkRect skrect = RectToSkRect(isrc);
- EXPECT_EQ(gfx::RectF(isrc).ToString(), SkRectToRectF(skrect).ToString());
-
- skrect = RectFToSkRect(fsrc);
- EXPECT_EQ(fsrc.ToString(), SkRectToRectF(skrect).ToString());
-}
-
// Similar to EXPECT_FLOAT_EQ, but lets NaN equal NaN
#define EXPECT_FLOAT_AND_NAN_EQ(a, b) \
{ if (a == a || b == b) { EXPECT_FLOAT_EQ(a, b); } }

Powered by Google App Engine
This is Rietveld 408576698