| Index: third_party/WebKit/LayoutTests/intersection-observer/root-margin.html
|
| diff --git a/third_party/WebKit/LayoutTests/intersection-observer/root-margin.html b/third_party/WebKit/LayoutTests/intersection-observer/root-margin.html
|
| index dda62ea367ecfadba79eaaab46948248591c025b..3a62f53245f418b3741a5d8865086fed9431f783 100644
|
| --- a/third_party/WebKit/LayoutTests/intersection-observer/root-margin.html
|
| +++ b/third_party/WebKit/LayoutTests/intersection-observer/root-margin.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 style="white-space: nowrap;">
|
| <div style="display: inline-block; width: 1000px; height: 100px"></div>
|
| @@ -27,19 +27,16 @@ onload = function() {
|
| observer.observe(target);
|
| entries = entries.concat(observer.takeRecords());
|
| shouldBeEqualToNumber("entries.length", 0);
|
| - // See README for explanation of double RAF.
|
| - requestAnimationFrame(() => { requestAnimationFrame(step0) });
|
| + waitForNotification(step0);
|
| }
|
|
|
| function step0() {
|
| - entries = entries.concat(observer.takeRecords());
|
| shouldBeEqualToNumber("entries.length", 0);
|
| document.scrollingElement.scrollLeft = 100;
|
| - requestAnimationFrame(step1);
|
| + waitForNotification(step1);
|
| }
|
|
|
| function step1() {
|
| - entries = entries.concat(observer.takeRecords());
|
| shouldBeEqualToNumber("entries.length", 1);
|
| if (entries.length > 0) {
|
| shouldBeEqualToNumber("entries.length", 1);
|
| @@ -58,18 +55,16 @@ function step1() {
|
| shouldEvaluateToSameObject("entries[0].target", target);
|
| }
|
| document.scrollingElement.scrollTop = 800;
|
| - requestAnimationFrame(step2);
|
| + waitForNotification(step2);
|
| }
|
|
|
| function step2() {
|
| - entries = entries.concat(observer.takeRecords());
|
| shouldBeEqualToNumber("entries.length", 1);
|
| document.scrollingElement.scrollTop = 900;
|
| - requestAnimationFrame(step3);
|
| + waitForNotification(step3);
|
| }
|
|
|
| function step3() {
|
| - entries = entries.concat(observer.takeRecords());
|
| shouldBeEqualToNumber("entries.length", 2);
|
| if (entries.length > 1) {
|
| shouldBeEqualToNumber("entries[1].boundingClientRect.left", 912);
|
|
|