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

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: 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..3ad77c701904934cc480f9894f64b83ee435b594 100644
--- a/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html
+++ b/third_party/WebKit/LayoutTests/intersection-observer/unclipped-root.html
@@ -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