OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../resources/intersection-observer-helper-functions.js"></script> |
| 3 <script src="../resources/testharness.js"></script> |
| 4 <script src="../resources/testharnessreport.js"></script> |
| 5 |
| 6 <title>Ensure that a visible zero-area element is given the correct intersection
ratio</title> |
| 7 |
| 8 <div id='target' style='width: 0px; height: 0px'</div>" |
| 9 |
| 10 <script> |
| 11 'use strict'; |
| 12 |
| 13 async_test(t => { |
| 14 let target = document.getElementById('target'); |
| 15 let entries = []; |
| 16 new IntersectionObserver(changes => { |
| 17 entries.push(...changes); |
| 18 }).observe(target); |
| 19 waitForNotification(t.step_func_done(() => { |
| 20 assert_equals(entries.length, 1); |
| 21 assert_equals(entries[0].intersectionRatio, 1); |
| 22 })); |
| 23 }); |
| 24 </script> |
OLD | NEW |