Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / shapes / BoxShapeTest.cpp
index 74538f3..2c68887 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <gtest/gtest.h>
 
-namespace WebCore {
+namespace blink {
 
 class BoxShapeTest : public ::testing::Test {
 protected:
@@ -47,28 +47,26 @@ protected:
     }
 };
 
-} // namespace WebCore
+} // namespace blink
 
 namespace {
 
-using namespace WebCore;
+using namespace blink;
 
 #define TEST_EXCLUDED_INTERVAL(shapePtr, lineTop, lineHeight, expectedLeft, expectedRight) \
 {                                                                                          \
-    SegmentList result;                                                                    \
-    shapePtr->getExcludedIntervals(lineTop, lineHeight, result);                           \
-    EXPECT_EQ(1u, result.size());                                                          \
-    if (result.size() == 1u) {                                                             \
-        EXPECT_FLOAT_EQ(expectedLeft, result[0].logicalLeft);                              \
-        EXPECT_FLOAT_EQ(expectedRight, result[0].logicalRight);                            \
+    LineSegment segment = shapePtr->getExcludedInterval(lineTop, lineHeight);                           \
+    EXPECT_TRUE(segment.isValid); \
+    if (segment.isValid) {                                                             \
+        EXPECT_FLOAT_EQ(expectedLeft, segment.logicalLeft);                              \
+        EXPECT_FLOAT_EQ(expectedRight, segment.logicalRight);                            \
     }                                                                                      \
 }
 
 #define TEST_NO_EXCLUDED_INTERVAL(shapePtr, lineTop, lineHeight) \
 {                                                                \
-    SegmentList result;                                          \
-    shapePtr->getExcludedIntervals(lineTop, lineHeight, result); \
-    EXPECT_EQ(0u, result.size());                                \
+    LineSegment segment = shapePtr->getExcludedInterval(lineTop, lineHeight); \
+    EXPECT_FALSE(segment.isValid); \
 }
 
 /* The BoxShape is based on a 100x50 rectangle at 0,0. The shape-margin value is 10,