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, float shapePadding) | 44 PassOwnPtr<Shape> createBoxShape(const RoundedRect& bounds, float shapeMargi
n, float shapePadding) |
45 { | 45 { |
46 return Shape::createLayoutBoxShape(bounds, TopToBottomWritingMode, Lengt
h(shapeMargin, Fixed), Length(shapePadding, Fixed)); | 46 return Shape::createBoxShape(bounds, TopToBottomWritingMode, Length(shap
eMargin, Fixed), Length(shapePadding, Fixed)); |
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 TEST_EXCLUDED_INTERVAL(shape, 10, 95, 0, 100); | 195 TEST_EXCLUDED_INTERVAL(shape, 10, 95, 0, 100); |
196 TEST_EXCLUDED_INTERVAL(shape, 5, 25, 0, 100); | 196 TEST_EXCLUDED_INTERVAL(shape, 5, 25, 0, 100); |
197 TEST_EXCLUDED_INTERVAL(shape, 15, 6, 0, 100); | 197 TEST_EXCLUDED_INTERVAL(shape, 15, 6, 0, 100); |
198 TEST_EXCLUDED_INTERVAL(shape, 20, 50, 0, 100); | 198 TEST_EXCLUDED_INTERVAL(shape, 20, 50, 0, 100); |
199 TEST_EXCLUDED_INTERVAL(shape, 69, 5, 0, 100); | 199 TEST_EXCLUDED_INTERVAL(shape, 69, 5, 0, 100); |
200 TEST_EXCLUDED_INTERVAL(shape, 85, 10, 0, 97.320511f); | 200 TEST_EXCLUDED_INTERVAL(shape, 85, 10, 0, 97.320511f); |
201 } | 201 } |
202 | 202 |
203 } // namespace | 203 } // namespace |
OLD | NEW |