blob: 7ab6aca5d7c4c7eae71968c7f747c2f2f9c91294 [file] [log] [blame]
<p>
This tests that a line break is prohibited between an ideographic comma and a right corner bracket.
</p>
<div id="target" style="font-size: 72px;">&#x3046;&#x3001;&#x0300d;&#x3046;</div>
<p id="result">Test did not run.</p>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var target = document.getElementById("target");
var range = document.createRange();
range.setStart(target.firstChild, 0);
range.setEnd(target.firstChild, 2);
var width = Math.ceil(range.getBoundingClientRect().width);
target.style.width = width + "px";
range.setStart(target.firstChild, 2);
range.setEnd(target.firstChild, 3);
var left = Math.ceil(range.getBoundingClientRect().left) - target.offsetLeft;
document.getElementById("result").innerText = left >= width ? "PASS" : "FAIL";
</script>