| Index: third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-3.html
|
| diff --git a/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-3.html b/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-3.html
|
| index 7148850f8d6aad298bd66051059444f29b30ff82..6b5e50faa697ce2aa1dbddee199ce018ee9c1850 100644
|
| --- a/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-3.html
|
| +++ b/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-3.html
|
| @@ -1,4 +1,5 @@
|
| <!DOCTYPE html>
|
| +<title>text-selection when dragging mouse outside the SVG text element</title>
|
| <style>
|
| text {
|
| font: 10px Arial;
|
| @@ -15,28 +16,22 @@ text {
|
| </g>
|
| </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('line1', 10, { x : 0, y : -20});
|
| -selectTextFromCharToPoint({ id: 'line1', offset: 0 }, absEndPos, { startElementId: "line1", start: "0", endElementId: "line1", end: "11" });
|
| -absEndPos = getEndPosition('line1', 23, { x : 0, y : -20});
|
| -selectTextFromCharToPoint({ id: 'line1', offset: 7 }, absEndPos, { startElementId: "line1", start: "7", endElementId: "line1", end: "24" });
|
| -absEndPos = getEndPosition('line2', 10, { x : 0, y : 20});
|
| -selectTextFromCharToPoint({ id: 'line2', offset: 0 }, absEndPos, { startElementId: "line2", start: "0", endElementId: "line2", end: "11" });
|
| -absEndPos = getEndPosition('line2', 23, { x : 0, y : 20});
|
| -selectTextFromCharToPoint({ id: 'line2', offset: 7 }, absEndPos, { startElementId: "line2", start: "7", endElementId: "line2", end: "24" });
|
| -absEndPos = getEndPosition('line2', 10, { x : 0, y : 20});
|
| -selectTextFromCharToPoint({ id: 'line1', offset: 7 }, absEndPos, { startElementId: "line1", start: "7", endElementId: "line2", end: "11" });
|
| -absEndPos = getEndPosition('line1', 20, { x : 0, y : -20});
|
| -selectTextFromCharToPoint({ id: 'line2', offset: 7 }, absEndPos, { startElementId: "line2", start: "7", endElementId: "line1", end: "21" });
|
| +<script>
|
| +test(function() {
|
| + var absEndPos = getEndPosition('line1', 10, { x : 0, y : -20});
|
| + selectTextFromCharToPoint({ id: 'line1', offset: 0 }, absEndPos, { startElementId: "line1", start: 0, endElementId: "line1", end: 11 });
|
| + absEndPos = getEndPosition('line1', 23, { x : 0, y : -20});
|
| + selectTextFromCharToPoint({ id: 'line1', offset: 7 }, absEndPos, { startElementId: "line1", start: 7, endElementId: "line1", end: 24 });
|
| + absEndPos = getEndPosition('line2', 10, { x : 0, y : 20});
|
| + selectTextFromCharToPoint({ id: 'line2', offset: 0 }, absEndPos, { startElementId: "line2", start: 0, endElementId: "line2", end: 11 });
|
| + absEndPos = getEndPosition('line2', 23, { x : 0, y : 20});
|
| + selectTextFromCharToPoint({ id: 'line2', offset: 7 }, absEndPos, { startElementId: "line2", start: 7, endElementId: "line2", end: 24 });
|
| + absEndPos = getEndPosition('line2', 10, { x : 0, y : 20});
|
| + selectTextFromCharToPoint({ id: 'line1', offset: 7 }, absEndPos, { startElementId: "line1", start: 7, endElementId: "line2", end: 11 });
|
| + absEndPos = getEndPosition('line1', 20, { x : 0, y : -20});
|
| + selectTextFromCharToPoint({ id: 'line2', offset: 7 }, absEndPos, { startElementId: "line2", start: 7, endElementId: "line1", end: 21 });
|
| +});
|
| </script>
|
|
|