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 src="helper-functions.js"></script> | 3 <script src="helper-functions.js"></script> |
4 <div style="width:100%; height:700px;"></div> | 4 <div style="width:100%; height:700px;"></div> |
5 <div id="target" style="background-color: green; width:100px; height:100px"></di
v> | 5 <div id="target" style="background-color: green; width:100px; height:100px"></di
v> |
6 <div style="width:100%; height:700px;"></div> | 6 <div style="width:100%; height:700px;"></div> |
7 | 7 |
8 <script> | 8 <script> |
9 description("Simple intersection observer test with no explicit root and one d
ocument."); | 9 description("Simple intersection observer test with no explicit root and one d
ocument."); |
10 var target = document.getElementById("target"); | 10 var target = document.getElementById("target"); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 shouldBeEqualToNumber("entries[1].boundingClientRect.bottom", 708); | 58 shouldBeEqualToNumber("entries[1].boundingClientRect.bottom", 708); |
59 shouldBeEqualToNumber("entries[1].intersectionRect.left", 0); | 59 shouldBeEqualToNumber("entries[1].intersectionRect.left", 0); |
60 shouldBeEqualToNumber("entries[1].intersectionRect.right", 0); | 60 shouldBeEqualToNumber("entries[1].intersectionRect.right", 0); |
61 shouldBeEqualToNumber("entries[1].intersectionRect.top", 0); | 61 shouldBeEqualToNumber("entries[1].intersectionRect.top", 0); |
62 shouldBeEqualToNumber("entries[1].intersectionRect.bottom", 0); | 62 shouldBeEqualToNumber("entries[1].intersectionRect.bottom", 0); |
63 shouldBeEqualToNumber("entries[1].rootBounds.left", 0); | 63 shouldBeEqualToNumber("entries[1].rootBounds.left", 0); |
64 shouldBeEqualToNumber("entries[1].rootBounds.right", 785); | 64 shouldBeEqualToNumber("entries[1].rootBounds.right", 785); |
65 shouldBeEqualToNumber("entries[1].rootBounds.top", 0); | 65 shouldBeEqualToNumber("entries[1].rootBounds.top", 0); |
66 shouldBeEqualToNumber("entries[1].rootBounds.bottom", 600); | 66 shouldBeEqualToNumber("entries[1].rootBounds.bottom", 600); |
67 shouldEvaluateToSameObject("entries[1].target", target); | 67 shouldEvaluateToSameObject("entries[1].target", target); |
68 finishTest(); | 68 finishJSTest(); |
69 document.scrollingElement.scrollTop = 0; | 69 document.scrollingElement.scrollTop = 0; |
70 }); | 70 }); |
71 } | 71 } |
72 | 72 |
73 </script> | 73 </script> |
OLD | NEW |