Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / international / complex-text-rectangle.html
blobb43fcd674646a769f9da6282e1db9ed3029fd5e7
1 <meta charset=utf-8>
3 <span id="a">A&#x20d5;A&#xFE20;A&#x20d5;A&#x20d5;A&#x20d5;A&#x20d5;A&#x20d5;&#x20d5;A&#x034b;</span>
5 This test passes if it doesn't crash or log a failure message to the console.
7 <script>
8 if (window.testRunner)
9 testRunner.dumpAsText();
11 var textNode = document.getElementById('a').firstChild;
12 var length = textNode.textContent.length;
13 for (var start = 0; start < length; ++start) {
14 for (var end = 0; end < length; ++end) {
15 var range = document.createRange();
16 range.setStart(textNode, start);
17 range.setEnd(textNode, end);
18 var rect = range.getBoundingClientRect();
19 if (rect.width < 0 || rect.width > 200) {
20 console.log('FAIL: rect.width is ' + rect.width);
21 break;
25 </script>