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