summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/animation/script-tests/request-animation-frame-cancel2.js
blob: 7af694f846e4ec335f08bd05b4235a0062a4d060 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
description("Tests one requestAnimationFrame callback cancelling a second");

var e = document.getElementById("e");
var secondCallbackId;

window.webkitRequestAnimationFrame(function() {
    window.webkitCancelRequestAnimationFrame(secondCallbackId);
}, e);

secondCallbackId = window.webkitRequestAnimationFrame(function() {
    testFailed("callback invoked after cancel");
}, e);

if (window.layoutTestController)
    layoutTestController.display();

var successfullyParsed = true;