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

Unified Diff: Source/core/rendering/shapes/BoxShapeTest.cpp

Issue 815933006: Change all uses of the RoundedRect class to use FloatRoundedRect instead. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumMac.mm ('k') | Source/core/rendering/shapes/Shape.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/BoxShapeTest.cpp
diff --git a/Source/core/rendering/shapes/BoxShapeTest.cpp b/Source/core/rendering/shapes/BoxShapeTest.cpp
index 2c68887c295cbdf6f8bad4dbfe0f4624bf7620e1..a160113933b58fc8fe8229aad0672d1386c92504 100644
--- a/Source/core/rendering/shapes/BoxShapeTest.cpp
+++ b/Source/core/rendering/shapes/BoxShapeTest.cpp
@@ -31,7 +31,7 @@
#include "core/rendering/shapes/BoxShape.h"
-#include "platform/geometry/RoundedRect.h"
+#include "platform/geometry/FloatRoundedRect.h"
#include <gtest/gtest.h>
@@ -41,7 +41,7 @@ class BoxShapeTest : public ::testing::Test {
protected:
BoxShapeTest() { }
- PassOwnPtr<Shape> createBoxShape(const RoundedRect& bounds, float shapeMargin)
+ PassOwnPtr<Shape> createBoxShape(const FloatRoundedRect& bounds, float shapeMargin)
{
return Shape::createLayoutBoxShape(bounds, TopToBottomWritingMode, shapeMargin);
}
@@ -80,7 +80,7 @@ using namespace blink;
*/
TEST_F(BoxShapeTest, zeroRadii)
{
- OwnPtr<Shape> shape = createBoxShape(RoundedRect(0, 0, 100, 50), 10);
+ OwnPtr<Shape> shape = createBoxShape(FloatRoundedRect(0, 0, 100, 50), 10);
EXPECT_FALSE(shape->isEmpty());
EXPECT_EQ(LayoutRect(-10, -10, 120, 70), shape->shapeMarginLogicalBoundingBox());
@@ -124,8 +124,8 @@ TEST_F(BoxShapeTest, zeroRadii)
*/
TEST_F(BoxShapeTest, getIntervals)
{
- const RoundedRect::Radii cornerRadii(IntSize(10, 15), IntSize(10, 20), IntSize(25, 15), IntSize(20, 30));
- OwnPtr<Shape> shape = createBoxShape(RoundedRect(IntRect(0, 0, 100, 100), cornerRadii), 0);
+ const FloatRoundedRect::Radii cornerRadii(IntSize(10, 15), IntSize(10, 20), IntSize(25, 15), IntSize(20, 30));
+ OwnPtr<Shape> shape = createBoxShape(FloatRoundedRect(IntRect(0, 0, 100, 100), cornerRadii), 0);
EXPECT_FALSE(shape->isEmpty());
EXPECT_EQ(LayoutRect(0, 0, 100, 100), shape->shapeMarginLogicalBoundingBox());
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumMac.mm ('k') | Source/core/rendering/shapes/Shape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698