| Index: third_party/WebKit/LayoutTests/intersection-observer/same-document-zero-size-target.html
|
| diff --git a/third_party/WebKit/LayoutTests/intersection-observer/same-document-zero-size-target.html b/third_party/WebKit/LayoutTests/intersection-observer/same-document-zero-size-target.html
|
| index 51010bb73b0bd48e6234e61893464b5f84cdc767..a66c392ca180ee3748a4c3ba6881e92f6bdbea62 100644
|
| --- a/third_party/WebKit/LayoutTests/intersection-observer/same-document-zero-size-target.html
|
| +++ b/third_party/WebKit/LayoutTests/intersection-observer/same-document-zero-size-target.html
|
| @@ -1,6 +1,6 @@
|
| <!DOCTYPE html>
|
| <script src="../resources/js-test.js"></script>
|
| -<script src="helper-functions.js"></script>
|
| +<script src="../resources/intersection-observer-helper-functions.js"></script>
|
| <div style="width:100%; height:700px;"></div>
|
| <div id="target" style="background-color: green; width:0px; height:0px"></div>
|
| <div style="width:100%; height:700px;"></div>
|
| @@ -16,12 +16,10 @@ onload = function() {
|
| entries.push(...observer.takeRecords());
|
| shouldBeEqualToNumber("entries.length", 0);
|
| document.scrollingElement.scrollTop = 300;
|
| - // See README for explanation of double RAF.
|
| - requestAnimationFrame(() => { requestAnimationFrame(step1) });
|
| + waitForNotification(step1);
|
| };
|
|
|
| function step1() {
|
| - entries.push(...observer.takeRecords());
|
| shouldBeEqualToNumber("entries.length", 1);
|
| if (entries.length > 0) {
|
| shouldBeEqualToNumber("entries[0].boundingClientRect.left", 8);
|
| @@ -44,11 +42,10 @@ function step1() {
|
| shouldEvaluateToSameObject("entries[0].rootBounds", entries[0].rootBounds);
|
| }
|
| document.scrollingElement.scrollTop = 100;
|
| - requestAnimationFrame(step2);
|
| + waitForNotification(step2);
|
| }
|
|
|
| function step2() {
|
| - entries.push(...observer.takeRecords());
|
| shouldBeEqualToNumber("entries.length", 2);
|
| if (entries.length > 1) {
|
| shouldBeEqualToNumber("entries[1].boundingClientRect.left", 8);
|
|
|