Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug </title>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 <script type="application/javascript">
13 /** Test for Bug **/
14 SimpleTest.waitForExplicitFinish();
15 var unprefixedRan = false;
16 var prefixedRan = false;
17 function unprefixed(time) {
18 is(prefixedRan, true, "We were called second");
19 unprefixedRan = true;
20 ok(Math.abs(time - performance.now()) < 3600000,
21 "An hour really shouldn't have passed here");
22 ok(Math.abs(time - Date.now()) > 3600000,
23 "More than an hour should have passed since 1970");
24 }
25 function prefixed(time) {
26 is(unprefixedRan, false, "Prefixed was called first");
27 prefixedRan = true;
28 ok(Math.abs(time - Date.now()) < 3600000,
29 "Our time should be comparable to Date.now()");
30 ok(Math.abs(time - performance.now()) > 3600000,
31 "Our time should not be comparable to performance.now()");
32 }
33 function prefixed2() {
34 ok(prefixedRan, "We should be after the other prefixed call");
35 ok(unprefixedRan, "We should be after the unprefixed call");
36 SimpleTest.finish();
37 }
39 window.onload = function() {
40 window.mozRequestAnimationFrame(prefixed);
41 window.requestAnimationFrame(unprefixed);
42 window.mozRequestAnimationFrame(prefixed2);
43 }
45 </script>
46 </head>
47 <body>
48 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
49 <p id="display"></p>
50 <div id="content" style="display: none">
52 </div>
53 <pre id="test">
54 </pre>
55 </body>
56 </html>