Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html

Issue 1983383002: Convert IntersectionObserver tests to use testRunner.runIdleTasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html b/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html
index 2bb0c81f770ce185dc3840dd1e094648baa08ffa..c11ae11ee565e5d6642f9580e35b6aa9a0ccf768 100644
--- a/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html
+++ b/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.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>
<style>
#root {
overflow: visible;
@@ -32,19 +32,16 @@ onload = function() {
observer.observe(target);
entries.push(...observer.takeRecords());
shouldBeEqualToNumber("entries.length", 0);
- // See README for explanation of double RAF.
- requestAnimationFrame(() => { requestAnimationFrame(step0) });
+ waitForNotification(step0);
}
function step0() {
- entries.push(...observer.takeRecords());
shouldBeEqualToNumber("entries.length", 0);
target.style.transform = "translateY(195px)";
- requestAnimationFrame(step1);
+ waitForNotification(step1);
}
function step1() {
- entries.push(...observer.takeRecords());
shouldBeEqualToNumber("entries.length", 1);
if (entries.length > 0) {
shouldBeEqualToNumber("entries[0].boundingClientRect.left", 15);

Powered by Google App Engine
This is Rietveld 408576698