blob: 0021de108f8668cb9c9679f480873fbe23adfd7c [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<svg id="svg" height="0" font-size="100">
<text id="text">
<!-- invalid non-bmp character followed by a valid character -->
<tspan>&#x90012;a</tspan>
<!-- many invalid non-bmp characters followed by a valid character -->
<tspan>&#x90012;&#x90012;&#x90012;&#x90012;a&#x90012;&#x90012;&#x90012;&#x90012;a</tspan>
<!-- alternating valid and invalid non-bmp characters -->
<tspan>&#128514;&#x90012;&#128514;&#x90012;&#128514;&#x90012;</tspan>
<!-- invalid non-bmp characters in rtl -->
<tspan direction="rtl">نشاط&#128514;نشاط&#x90012;&#x90012;ن&#x90012;شاط&#128514;نش&#x90012;اط&#x90012;ا</tspan>
</text>
</svg>
<script>
test(function() {
text.getComputedTextLength();
svg.parentElement.removeChild(svg);
}, 'Text runs with invalid non-bmp characters should not crash.');
</script>