Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!-- |
michael@0 | 2 | Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 4 | --> |
michael@0 | 5 | <html> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Promise - bug 883683</title> |
michael@0 | 8 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 10 | </head> |
michael@0 | 11 | <body> |
michael@0 | 12 | <p id="display"></p> |
michael@0 | 13 | <div id="content" style="display: none"> |
michael@0 | 14 | |
michael@0 | 15 | </div> |
michael@0 | 16 | <pre id="test"> |
michael@0 | 17 | <script type="application/javascript"><!-- |
michael@0 | 18 | |
michael@0 | 19 | function runTest() { |
michael@0 | 20 | [{}, {}, {}, {}, {}].reduce(Promise.reject); |
michael@0 | 21 | ok(true, "No leaks with reject?"); |
michael@0 | 22 | |
michael@0 | 23 | [{}, {}, {}, {}, {}].reduce(Promise.resolve); |
michael@0 | 24 | ok(true, "No leaks with resolve?"); |
michael@0 | 25 | |
michael@0 | 26 | [{}, {}, {}, {}, {}].reduce(function(a, b, c, d) { return new Promise(function(r1, r2) { throw a; }); }); |
michael@0 | 27 | ok(true, "No leaks with exception?"); |
michael@0 | 28 | |
michael@0 | 29 | [{}, {}, {}, {}, {}].reduce(function(a, b, c, d) { return new Promise(function(r1, r2) { }); }); |
michael@0 | 30 | ok(true, "No leaks with empty promise?"); |
michael@0 | 31 | |
michael@0 | 32 | SimpleTest.finish(); |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 36 | runTest(); |
michael@0 | 37 | // --> |
michael@0 | 38 | </script> |
michael@0 | 39 | </pre> |
michael@0 | 40 | </body> |
michael@0 | 41 | </html> |