blob: 080cb67af8f1a6ef143f5e24888f783c8f9ae68f [file] [log] [blame]
description("Tests one requestAnimationFrame callback cancelling a second");
var e = document.getElementById("e");
var secondCallbackId;
var callbackFired = false;
var cancelFired = false;
window.requestAnimationFrame(function() {
cancelFired = true;
window.cancelAnimationFrame(secondCallbackId);
}, e);
secondCallbackId = window.requestAnimationFrame(function() {
callbackFired = true;
}, e);
requestAnimationFrame(function() {
shouldBeFalse("callbackFired");
shouldBeTrue("cancelFired");
isSuccessfullyParsed();
if (window.testRunner)
testRunner.notifyDone();
});
if (window.testRunner)
testRunner.waitUntilDone();