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

Unified Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-hover-clear.html

Issue 112023010: Make EventHandler::ActiveIntervalTimer mockable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Naming change Created 6 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
Index: LayoutTests/fast/events/touch/gesture/gesture-tap-hover-clear.html
diff --git a/LayoutTests/fast/events/touch/gesture/gesture-tap-hover-clear.html b/LayoutTests/fast/events/touch/gesture/gesture-tap-hover-clear.html
index dd3ef9c60e9dbda45c447004b739f9bab37db69d..5523f53cd21bd6fd7dbe140f6db0988671193aa5 100644
--- a/LayoutTests/fast/events/touch/gesture/gesture-tap-hover-clear.html
+++ b/LayoutTests/fast/events/touch/gesture/gesture-tap-hover-clear.html
@@ -60,6 +60,13 @@ function runTests()
return;
}
+ if (!internals.fireActiveIntervalTimer) {
+ debug('Mocked timers are not supported by this platform');
+ return;
+ }
+
+ internals.setActiveIntervalTimerInManualMode(document, true);
+
debug("The Don't Click Me div should not be visible.");
shouldBe("dontClickMe.offsetTop", "0");
@@ -71,15 +78,7 @@ function runTests()
debug("The Don't Click Me div should not be visible after a GestureTap on the Click Me div.");
shouldBe(document.elementFromPoint(250, 250).id, "clickme");
eventSender.gestureTap(250, 250);
- waitUntilActiveCleared();
-}
-
-function waitUntilActiveCleared()
-{
- if (dontClickMe.offsetTop != 0) {
- return setTimeout(waitUntilActiveCleared, 10);
- }
-
+ internals.fireActiveIntervalTimer(document);
shouldBe("dontClickMe.offsetTop", "0");
debug("The Don't Click Me div should be visible after a GestureShowPress on the Hover Over Me div.");
@@ -90,13 +89,6 @@ function waitUntilActiveCleared()
debug("The Don't Click Me div should not be visible after a mouse move to below the Click Me div.");
eventSender.mouseMoveTo(350, 350);
shouldBe("dontClickMe.offsetTop", "0");
-
- finishJSTest();
-}
-
-if (window.testRunner) {
- window.jsTestIsAsync = true;
- testRunner.waitUntilDone();
}
runTests();
« no previous file with comments | « LayoutTests/fast/events/touch/gesture/gesture-tap-active-state-iframe-expected.txt ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698