| <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;">う、」う</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> |