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

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp

Issue 1545813002: Remove unnecessary RAF from tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer-document-root
Patch Set: rebaseline Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/intersection-observer/same-document-root.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp
index 125c67f46875669c15fe22ff3f0af6a6ec3734f1..f8fb2b9409de28bda257bcedee5e7c8cb269264c 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp
@@ -28,7 +28,9 @@ IntersectionObserverController::~IntersectionObserverController() { }
void IntersectionObserverController::scheduleIntersectionObserverForDelivery(IntersectionObserver& observer)
{
- // TODO(szager): use idle callback with a timeout
+ // TODO(szager): use idle callback with a timeout. Until we do that, there is no
+ // reliable way to write a test for takeRecords, because it's impossible to guarantee
+ // that javascript will get a chance to run before the timer fires.
if (!m_timer.isActive())
m_timer.startOneShot(0, BLINK_FROM_HERE);
m_pendingIntersectionObservers.add(&observer);
« no previous file with comments | « third_party/WebKit/LayoutTests/intersection-observer/same-document-root.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698