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

Unified Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-active-state-iframe.html

Issue 112023010: Make EventHandler::ActiveIntervalTimer mockable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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: LayoutTests/fast/events/touch/gesture/gesture-tap-active-state-iframe.html
diff --git a/LayoutTests/fast/events/touch/gesture/gesture-tap-active-state-iframe.html b/LayoutTests/fast/events/touch/gesture/gesture-tap-active-state-iframe.html
index db501df4a48417b22d2793096ccb9ae71c7120bd..338969792e79d0b4dbed0de9ca8e387379faf999 100644
--- a/LayoutTests/fast/events/touch/gesture/gesture-tap-active-state-iframe.html
+++ b/LayoutTests/fast/events/touch/gesture/gesture-tap-active-state-iframe.html
@@ -38,6 +38,14 @@ function runTests(ba)
return;
}
+ if (!internals.fireActiveIntervalTimer) {
+ debug('Mocked timers are not supported by this platform');
+ return;
+ }
+
+ var iframeDoc = document.getElementById('frame').contentDocument;
+ internals.suspendActiveIntervalTimer(iframeDoc);
+
// Scroll so the box is at the top
window.scrollTo(0, 400);
@@ -48,17 +56,8 @@ function runTests(ba)
eventSender.gestureShowPress(450, 50);
shouldBeTrue("isBoxActive()");
eventSender.gestureTap(450, 50);
- // FIXME: Enable after implementing mocked timers (http://crbug.com/319529)
- // shouldBeTrue("isBoxActive()");
- waitUntilActiveCleared();
-}
-
-function waitUntilActiveCleared()
-{
- if(isBoxActive()) {
- return setTimeout(waitUntilActiveCleared, 10);
- }
-
+ shouldBeTrue("isBoxActive()");
+ internals.fireActiveIntervalTimer(iframeDoc);
shouldBeFalse("isBoxActive()");
finishJSTest();
}

Powered by Google App Engine
This is Rietveld 408576698