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 |
new file mode 100644 |
index 0000000000000000000000000000000000000000..159b6fdbb89d8b3c2c2b96642ee2e7931ff7e0e5 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-2.html |
@@ -0,0 +1,59 @@ |
+<!DOCTYPE html> |
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400" viewBox="0 0 430 430" style="border: 1px solid black;"> |
+ <g> |
+ <text id="line1" x="10" y="70" font-family="Arial" font-size="10" fill="black">Hello World. Hello, SVG.</text> |
+ </g> |
+ <g transform="translate(100,100)"> |
+ <text id="line2" x="10" y="70" font-family="Arial" font-size="10" fill="black">Hello World. Hello, SVG.</text> |
+ </g> |
+ <g transform="translate(200,200)"> |
+ <text id="line3" x="10" y="70" font-family="Arial" font-size="10" fill="black">Hello World. Hello, SVG.</text> |
+ </g> |
+</svg> |
+<script src="../../resources/js-test.js"></script> |
+<script src="resources/SelectionTestCase.js"></script> |
+<script type="text/javascript"> |
+var element = document.getElementById('line1'); |
+var endPos = element.getEndPositionOfChar(10); |
+endPos.y += (element.getBBox().height * 1.5); |
+var absEndPos = toAbsoluteCoordinates(endPos, element); |
+selectTextFromCharToPoint({ id: 'line1', offset: 0 }, absEndPos, { start: "0", end: "11" }); |
+selectTextFromCharToPoint({ id: 'line1', offset: 6 }, absEndPos, { start: "6", end: "11" }); |
+ |
+endPos = element.getEndPositionOfChar(23); |
+endPos.y += (element.getBBox().height * 1.5); |
+absEndPos = toAbsoluteCoordinates(endPos, element); |
+selectTextFromCharToPoint({ id: 'line1', offset: 12 }, absEndPos, { start: "12", end: "24" }); |
+ |
+element = document.getElementById('line2'); |
+endPos = element.getEndPositionOfChar(10); |
+endPos.y += (element.getBBox().height * 1.5); |
+absEndPos = toAbsoluteCoordinates(endPos, element); |
+selectTextFromCharToPoint({ id: 'line2', offset: 0 }, absEndPos, { start: "0", end: "11" }); |
+ |
+endPos = element.getEndPositionOfChar(10); |
fs
2016/02/12 17:05:42
This test would be easier to follow if you wrapped
hyunjunekim2
2016/02/15 13:34:20
Done.
|
+endPos.y += (element.getBBox().height * 1.5); |
+absEndPos = toAbsoluteCoordinates(endPos, element); |
+selectTextFromCharToPoint({ id: 'line2', offset: 6 }, absEndPos, { start: "6", end: "11" }); |
+ |
+endPos = element.getEndPositionOfChar(23); |
+endPos.y += (element.getBBox().height * 1.5); |
+absEndPos = toAbsoluteCoordinates(endPos, element); |
+selectTextFromCharToPoint({ id: 'line2', offset: 12 }, absEndPos, { start: "12", end: "24" }); |
+ |
+element = document.getElementById('line3'); |
+endPos = element.getEndPositionOfChar(10); |
+endPos.y += (element.getBBox().height * 1.5); |
+absEndPos = toAbsoluteCoordinates(endPos, element); |
+selectTextFromCharToPoint({ id: 'line3', offset: 0 }, absEndPos, { start: "0", end: "11" }); |
+ |
+endPos = element.getEndPositionOfChar(10); |
+endPos.y += (element.getBBox().height * 1.5); |
+absEndPos = toAbsoluteCoordinates(endPos, element); |
+selectTextFromCharToPoint({ id: 'line3', offset: 6 }, absEndPos, { start: "6", end: "11" }); |
+ |
+endPos = element.getEndPositionOfChar(23); |
+endPos.y += (element.getBBox().height * 1.5); |
+absEndPos = toAbsoluteCoordinates(endPos, element); |
+selectTextFromCharToPoint({ id: 'line3', offset: 12 }, absEndPos, { start: "12", end: "24" }); |
+</script> |