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); |