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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 * (--+---------+--) | 111 * (--+---------+--) |
112 * y=15 +--| |-+ y=20 | 112 * y=15 +--| |-+ y=20 |
113 * | | | 113 * | | |
114 * | | | 114 * | | |
115 * y=85 + -| |- + y=70 | 115 * y=85 + -| |- + y=70 |
116 * (--+---------+--) | 116 * (--+---------+--) |
117 * (25, 15) x=25 x=80 (20, 30) | 117 * (25, 15) x=25 x=80 (20, 30) |
118 */ | 118 */ |
119 TEST_F(BoxShapeTest, getIntervals) | 119 TEST_F(BoxShapeTest, getIntervals) |
120 { | 120 { |
121 const FloatRoundedRect::Radii cornerRadii(IntSize(10, 15), IntSize(10, 20),
IntSize(25, 15), IntSize(20, 30)); | 121 const FloatRoundedRect::Radii cornerRadii(FloatSize(10, 15), FloatSize(10, 2
0), FloatSize(25, 15), FloatSize(20, 30)); |
122 OwnPtr<Shape> shape = createBoxShape(FloatRoundedRect(IntRect(0, 0, 100, 100
), cornerRadii), 0); | 122 OwnPtr<Shape> shape = createBoxShape(FloatRoundedRect(IntRect(0, 0, 100, 100
), cornerRadii), 0); |
123 EXPECT_FALSE(shape->isEmpty()); | 123 EXPECT_FALSE(shape->isEmpty()); |
124 | 124 |
125 EXPECT_EQ(LayoutRect(0, 0, 100, 100), shape->shapeMarginLogicalBoundingBox()
); | 125 EXPECT_EQ(LayoutRect(0, 0, 100, 100), shape->shapeMarginLogicalBoundingBox()
); |
126 | 126 |
127 TEST_EXCLUDED_INTERVAL(shape, 10, 95, 0, 100); | 127 TEST_EXCLUDED_INTERVAL(shape, 10, 95, 0, 100); |
128 TEST_EXCLUDED_INTERVAL(shape, 5, 25, 0, 100); | 128 TEST_EXCLUDED_INTERVAL(shape, 5, 25, 0, 100); |
129 TEST_EXCLUDED_INTERVAL(shape, 15, 6, 0, 100); | 129 TEST_EXCLUDED_INTERVAL(shape, 15, 6, 0, 100); |
130 TEST_EXCLUDED_INTERVAL(shape, 20, 50, 0, 100); | 130 TEST_EXCLUDED_INTERVAL(shape, 20, 50, 0, 100); |
131 TEST_EXCLUDED_INTERVAL(shape, 69, 5, 0, 100); | 131 TEST_EXCLUDED_INTERVAL(shape, 69, 5, 0, 100); |
132 TEST_EXCLUDED_INTERVAL(shape, 85, 10, 0, 97.320511f); | 132 TEST_EXCLUDED_INTERVAL(shape, 85, 10, 0, 97.320511f); |
133 } | 133 } |
134 | 134 |
135 } // anonymous namespace | 135 } // anonymous namespace |
136 | 136 |
137 } // namespace blink | 137 } // namespace blink |
OLD | NEW |