OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <script> | 3 <script> |
4 description('When adding focus ring rects, we should avoid adding duplicated rec
t for continuations'); | 4 description('When adding focus ring rects, we should avoid adding duplicated rec
t for continuations'); |
5 onload = function() { | 5 onload = function() { |
6 document.body.offsetTop; | 6 document.body.offsetTop; |
7 // 5 focus ring rects: | 7 // 5 focus ring rects: |
8 // - 0: 'SPAN0' part of the span; | 8 // - 0: 'SPAN0' part of the span; |
9 // - 1: div DIV1 | 9 // - 1: div DIV1 |
10 // - 2: first line box of div DIV1 | 10 // - 2: first line box of div DIV1 |
11 // - 3: div DIV2 | 11 // - 3: div DIV2 |
12 // - 4: first line box of div DIV2 | 12 // - 4: first line box of div DIV2 |
13 if (window.testRunner && window.internals) | 13 if (window.testRunner && window.internals) |
14 shouldBe("internals.focusRingRects(document.getElementById('focus'))", "5"); | 14 shouldBe("internals.outlineRects(document.getElementById('focus')).length",
"5"); |
15 }; | 15 }; |
16 </script> | 16 </script> |
17 <div> | 17 <div> |
18 <span id="focus">SPAN0 | 18 <span id="focus">SPAN0 |
19 <div>DIV1 | 19 <div>DIV1 |
20 <span>SPAN1 | 20 <span>SPAN1 |
21 <div>DIV2</div> | 21 <div>DIV2</div> |
22 </span> | 22 </span> |
23 </div> | 23 </div> |
24 </span> | 24 </span> |
25 </div> | 25 </div> |
OLD | NEW |