tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / fast / animation / script-tests / request-animation-frame-within-callback.js
1 description("Tests adding one callback within another");
2
3 var e = document.getElementById("e");
4 var sameFrame;
5 window.webkitRequestAnimationFrame(function() {
6     sameFrame = true;
7 }, e);
8 window.webkitRequestAnimationFrame(function() {
9     window.webkitRequestAnimationFrame(function() {
10         shouldBeFalse("sameFrame");
11     }, e);
12 }, e);
13 window.webkitRequestAnimationFrame(function() {
14     sameFrame = false;
15 }, e);
16
17 // This should fire the three already registered callbacks, but not the one dynamically registered.
18 if (window.layoutTestController)
19     layoutTestController.display();
20 // This should fire the dynamically registered callback.
21 if (window.layoutTestController)
22     layoutTestController.display();
23
24 if (window.layoutTestController)
25     layoutTestController.waitUntilDone();
26
27 setTimeout(function() {
28     isSuccessfullyParsed();
29     if (window.layoutTestController)
30         layoutTestController.notifyDone();
31 }, 200);