OLD | NEW |
1 <meta charset=utf-8> | 1 <meta charset=utf-8> |
2 | 2 |
3 <span id="a">A⃕A︠A⃕A⃕A⃕A⃕A⃕
0d5;A͋</span> | 3 <span id="a">A⃕A︠A⃕A⃕A⃕A⃕A⃕
0d5;A͋</span> |
4 | 4 |
5 This test passes if it doesn't crash or log a failure message to the console. | 5 This test passes if it doesn't crash or log a failure message to the console. |
6 | 6 |
7 <script> | 7 <script> |
8 if (window.layoutTestController) | 8 if (window.layoutTestController) |
9 layoutTestController.dumpAsText(); | 9 layoutTestController.dumpAsText(); |
10 | 10 |
11 var textNode = document.getElementById('a').firstChild; | 11 var textNode = document.getElementById('a').firstChild; |
12 var length = textNode.textContent.length; | 12 var length = textNode.textContent.length; |
13 for (var start = 0; start < length; ++start) { | 13 for (var start = 0; start < length; ++start) { |
14 for (var end = 0; end < length; ++end) { | 14 for (var end = 0; end < length; ++end) { |
15 var range = document.createRange(); | 15 var range = document.createRange(); |
16 range.setStart(textNode, start); | 16 range.setStart(textNode, start); |
17 range.setEnd(textNode, end); | 17 range.setEnd(textNode, end); |
18 var rect = range.getBoundingClientRect(); | 18 var rect = range.getBoundingClientRect(); |
19 if (rect.width < 0 || rect.width > 200) { | 19 if (rect.width < 0 || rect.width > 200) { |
20 console.log('FAIL: rect.width is ' + rect.width); | 20 console.log('FAIL: rect.width is ' + rect.width); |
21 break; | 21 break; |
22 } | 22 } |
23 } | 23 } |
24 } | 24 } |
25 </script> | 25 </script> |
OLD | NEW |