Index: third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-1.html |
diff --git a/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-1.html b/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-1.html |
index 18f28587031b3f470b90d38e9741c94a5ec39a83..ebf31c80a89c92c97c452df2c35c8f0d23130695 100644 |
--- a/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-1.html |
+++ b/third_party/WebKit/LayoutTests/svg/text/selection-dragging-outside-1.html |
@@ -12,9 +12,11 @@ text { |
</g> |
<text id="line" x="130" y="150">Hello World. Hello, SVG.</text> |
</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"> |
+test(function() { |
function getEndPosition(id, offset, gap) { |
Srirama
2016/08/19 11:42:14
give indentation for all the code inside test func
Srirama
2016/08/19 11:42:14
looks like this is common in most of the tests. So
Shanmuga Pandi
2016/08/22 06:40:34
Done.
Shanmuga Pandi
2016/08/22 06:40:34
Done.
|
var element = document.getElementById(id); |
var endPos = element.getEndPositionOfChar(offset); |
@@ -24,20 +26,20 @@ function getEndPosition(id, offset, gap) { |
return absEndPos; |
} |
-selectTextFromCharToPoint({ id: 'line', offset: 0 }, { x: 400, y: 400 }, { startElementId: 'line', start: "0", endElementId: "line", end: "24" }); |
-selectTextFromCharToPoint({ id: 'line', offset: 7 }, { x: 400, y: 400 }, { startElementId: "line", start: "7", endElementId: "line", end: "24" }); |
+selectTextFromCharToPoint({ id: 'line', offset: 0 }, { x: 400, y: 400 }, { startElementId: 'line', start: 0, endElementId: "line", end: 24 }); |
+selectTextFromCharToPoint({ id: 'line', offset: 7 }, { x: 400, y: 400 }, { startElementId: "line", start: 7, endElementId: "line", end: 24 }); |
var absEndPos = getEndPosition('firsttext', 3, { x : 0, y : 0}); |
-selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: "0", endElementId: "firsttext", end: "4"}); |
+selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: 0, endElementId: "firsttext", end: 4}); |
absEndPos = getEndPosition('firsttext', 3, { x : 0, y : 10}); |
-selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: "0", endElementId: "middletext", end: "4"}); |
+selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: 0, endElementId: "middletext", end: 4}); |
absEndPos = getEndPosition('firsttext', 3, { x : 0, y : 20}); |
-selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: "0", endElementId: "middletext", end: "4"}); |
+selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: 0, endElementId: "middletext", end: 4}); |
absEndPos = getEndPosition('firsttext', 3, { x : 0, y : 30}); |
-selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: "0", endElementId: "endtext", end: "4"}); |
+selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: 0, endElementId: "endtext", end: 4}); |
absEndPos = getEndPosition('firsttext', 3, { x : 0, y : 40}); |
-selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: "0", endElementId: "endtext", end: "4"}); |
+selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: 0, endElementId: "endtext", end: 4}); |
absEndPos = getEndPosition('firsttext', 3, { x : 0, y : 50}); |
-selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: "0", endElementId: "endtext", end: "4"}); |
- |
+selectTextFromCharToPoint({ id: 'firsttext', offset: 0 }, absEndPos, { startElementId: 'firsttext', start: 0, endElementId: "endtext", end: 4}); |
+}); |
</script> |