33 lines
864 B
HTML
33 lines
864 B
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body>
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
<script>
|
|
var svgNS = "http://www.w3.org/2000/svg";
|
|
|
|
var svgRoot = document.createElementNS(svgNS, "svg");
|
|
document.documentElement.appendChild(svgRoot);
|
|
|
|
var svgText = document.createElementNS(svgNS, "text");
|
|
svgText.style.fontFamily = "Ahem";
|
|
svgText.style.fontSize = "20px";
|
|
svgText.appendChild(document.createTextNode("abc"));
|
|
svgRoot.appendChild(svgText);
|
|
|
|
shouldThrow("svgText.selectSubString(-1, 0)");
|
|
shouldBe("svgText.getSubStringLength(0, -1)", "60");
|
|
shouldThrow("svgText.getSubStringLength(3, 0)");
|
|
|
|
// cleanup
|
|
document.documentElement.removeChild(svgRoot);
|
|
|
|
var successfullyParsed = true;
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|