| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="./intersection-observer-test-utils.js"></script> | 4 <script src="./intersection-observer-test-utils.js"></script> |
| 5 | 5 |
| 6 <style> | 6 <style> |
| 7 #root { | 7 #root { |
| 8 width: 200px; | 8 width: 200px; |
| 9 height: 200px; | 9 height: 200px; |
| 10 } | 10 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 }, {root: root}); | 49 }, {root: root}); |
| 50 observer.observe(target); | 50 observer.observe(target); |
| 51 entries = entries.concat(observer.takeRecords()); | 51 entries = entries.concat(observer.takeRecords()); |
| 52 assert_equals(entries.length, 0, "No initial notifications.") | 52 assert_equals(entries.length, 0, "No initial notifications.") |
| 53 runTestCycle(step1, "First rAF."); | 53 runTestCycle(step1, "First rAF."); |
| 54 }, "IntersectionObserver in iframe with explicit root."); | 54 }, "IntersectionObserver in iframe with explicit root."); |
| 55 | 55 |
| 56 function step1() { | 56 function step1() { |
| 57 scroller.scrollTop = 250; | 57 scroller.scrollTop = 250; |
| 58 runTestCycle(step2, "scroller.scrollTop = 250"); | 58 runTestCycle(step2, "scroller.scrollTop = 250"); |
| 59 assert_equals(entries.length, 0, "No notifications after first rAF."); | 59 checkLastEntry(entries, 0, [8, 108, 308, 408, 0, 0, 0, 0, 8, 208, 8, 208, targ
et]); |
| 60 } | 60 } |
| 61 | 61 |
| 62 function step2() { | 62 function step2() { |
| 63 checkLastEntry(entries, 0, [8, 108, 58, 158, 8, 108, 58, 158, 8, 208, 8, 208,
target]); | 63 checkLastEntry(entries, 1, [8, 108, 58, 158, 8, 108, 58, 158, 8, 208, 8, 208,
target]); |
| 64 } | 64 } |
| 65 </script> | 65 </script> |
| OLD | NEW |