Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-2.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-2.html b/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-2.html |
| index 16022b4ddb1159751ac3675793d7c097fb1e7d84..248e74f0bf929904719ed621a09b1adf85db1d28 100644 |
| --- a/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-2.html |
| +++ b/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-2.html |
| @@ -15,33 +15,27 @@ text { |
| <text id="line3" x="100" y="100">Hello World. Hello, SVG.</text> |
| </g> |
| </svg> |
| -<script src="../../resources/js-test.js"></script> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| <script src="resources/SelectionTestCase.js"></script> |
| -<script type="text/javascript"> |
| -function getEndPosition(id, offset, gap) { |
| - var element = document.getElementById(id); |
| - var endPos = element.getEndPositionOfChar(offset); |
| - endPos.x += gap.x; |
| - endPos.y += gap.y; |
| - var absEndPos = toAbsoluteCoordinates(endPos, element); |
| - return absEndPos; |
| -} |
| - |
| -var absEndPos = getEndPosition('line3', 10, { x : 0, y : 30}); |
| -selectTextFromCharToPoint({ id: 'line1', offset: 7 }, absEndPos, { startElementId: "line1", start: "7", endElementId: "line3", end: "11" }); |
| +<script> |
| +test(function() { |
| + var absEndPos = getEndPosition('line3', 10, { x : 0, y : 30}); |
| + selectTextFromCharToPoint({ id: 'line1', offset: 7 }, absEndPos, { startElementId: "line1", start: 7, endElementId: "line3", end: 11 }); |
| -absEndPos = getEndPosition('line2', 10, { x : 0, y : 30}); |
| -selectTextFromCharToPoint({ id: 'line1', offset: 7 }, absEndPos, { startElementId: "line1", start: "7", endElementId: "line2", end: "11" }); |
| + absEndPos = getEndPosition('line2', 10, { x : 0, y : 30}); |
| + selectTextFromCharToPoint({ id: 'line1', offset: 7 }, absEndPos, { startElementId: "line1", start: 7, endElementId: "line2", end: 11 }); |
| -absEndPos = getEndPosition('line3', 10, { x : 0, y : 30}); |
| -selectTextFromCharToPoint({ id: 'line2', offset: 7 }, absEndPos, { startElementId: "line2", start: "7", endElementId: "line3", end: "11" }); |
| + absEndPos = getEndPosition('line3', 10, { x : 0, y : 30}); |
| + selectTextFromCharToPoint({ id: 'line2', offset: 7 }, absEndPos, { startElementId: "line2", start: 7, endElementId: "line3", end: 11 }); |
| -absEndPos = getEndPosition('line1', 8, { x : 0, y : -30}); |
| -selectTextFromCharToPoint({ id: 'line3', offset: 7 }, absEndPos, { startElementId: "line3", start: "7", endElementId: "line1", end: "9" }); |
| + absEndPos = getEndPosition('line1', 8, { x : 0, y : -30}); |
| + selectTextFromCharToPoint({ id: 'line3', offset: 7 }, absEndPos, { startElementId: "line3", start: 7, endElementId: "line1", end: 9 }); |
| -absEndPos = getEndPosition('line1', 8, { x : 0, y : -30}); |
| -selectTextFromCharToPoint({ id: 'line2', offset: 7 }, absEndPos, { startElementId: "line2", start: "7", endElementId: "line1", end: "9" }); |
| + absEndPos = getEndPosition('line1', 8, { x : 0, y : -30}); |
| + selectTextFromCharToPoint({ id: 'line2', offset: 7 }, absEndPos, { startElementId: "line2", start: 7, endElementId: "line1", end: 9 }); |
| -absEndPos = getEndPosition('line2', 8, { x : 0, y : -30}); |
| -selectTextFromCharToPoint({ id: 'line3', offset: 7 }, absEndPos, { startElementId: "line3", start: "7", endElementId: "line2", end: "9" }); |
| + absEndPos = getEndPosition('line2', 8, { x : 0, y : -30}); |
| + selectTextFromCharToPoint({ id: 'line3', offset: 7 }, absEndPos, { startElementId: "line3", start: 7, endElementId: "line2", end: 9 }); |
| +}); |
|
fs
2016/08/22 14:10:05
Ditto (like -1)
Shanmuga Pandi
2016/08/23 07:11:38
Done.
|
| </script> |