| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include <gtest/gtest.h> | 36 #include <gtest/gtest.h> |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 class BoxShapeTest : public ::testing::Test { | 40 class BoxShapeTest : public ::testing::Test { |
| 41 protected: | 41 protected: |
| 42 BoxShapeTest() { } | 42 BoxShapeTest() { } |
| 43 | 43 |
| 44 PassOwnPtr<Shape> createBoxShape(const RoundedRect& bounds, float shapeMargi
n) | 44 PassOwnPtr<Shape> createBoxShape(const RoundedRect& bounds, float shapeMargi
n) |
| 45 { | 45 { |
| 46 return Shape::createLayoutBoxShape(bounds, TopToBottomWritingMode, Lengt
h(shapeMargin, Fixed)); | 46 return Shape::createLayoutBoxShape(bounds, TopToBottomWritingMode, shape
Margin); |
| 47 } | 47 } |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace WebCore | 50 } // namespace WebCore |
| 51 | 51 |
| 52 namespace { | 52 namespace { |
| 53 | 53 |
| 54 using namespace WebCore; | 54 using namespace WebCore; |
| 55 | 55 |
| 56 #define TEST_EXCLUDED_INTERVAL(shapePtr, lineTop, lineHeight, expectedLeft, expe
ctedRight) \ | 56 #define TEST_EXCLUDED_INTERVAL(shapePtr, lineTop, lineHeight, expectedLeft, expe
ctedRight) \ |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 TEST_EXCLUDED_INTERVAL(shape, 10, 95, 0, 100); | 135 TEST_EXCLUDED_INTERVAL(shape, 10, 95, 0, 100); |
| 136 TEST_EXCLUDED_INTERVAL(shape, 5, 25, 0, 100); | 136 TEST_EXCLUDED_INTERVAL(shape, 5, 25, 0, 100); |
| 137 TEST_EXCLUDED_INTERVAL(shape, 15, 6, 0, 100); | 137 TEST_EXCLUDED_INTERVAL(shape, 15, 6, 0, 100); |
| 138 TEST_EXCLUDED_INTERVAL(shape, 20, 50, 0, 100); | 138 TEST_EXCLUDED_INTERVAL(shape, 20, 50, 0, 100); |
| 139 TEST_EXCLUDED_INTERVAL(shape, 69, 5, 0, 100); | 139 TEST_EXCLUDED_INTERVAL(shape, 69, 5, 0, 100); |
| 140 TEST_EXCLUDED_INTERVAL(shape, 85, 10, 0, 97.320511f); | 140 TEST_EXCLUDED_INTERVAL(shape, 85, 10, 0, 97.320511f); |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace | 143 } // namespace |
| OLD | NEW |