dom/promise/tests/test_bug883683.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/promise/tests/test_bug883683.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +<!--
     1.5 +  Any copyright is dedicated to the Public Domain.
     1.6 +  http://creativecommons.org/publicdomain/zero/1.0/
     1.7 +-->
     1.8 +<html>
     1.9 +<head>
    1.10 +  <title>Promise - bug 883683</title>
    1.11 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.13 +</head>
    1.14 +<body>
    1.15 +<p id="display"></p>
    1.16 +<div id="content" style="display: none">
    1.17 +
    1.18 +</div>
    1.19 +<pre id="test">
    1.20 +<script type="application/javascript"><!--
    1.21 +
    1.22 +function runTest() {
    1.23 +  [{}, {}, {}, {}, {}].reduce(Promise.reject);
    1.24 +  ok(true, "No leaks with reject?");
    1.25 +
    1.26 +  [{}, {}, {}, {}, {}].reduce(Promise.resolve);
    1.27 +  ok(true, "No leaks with resolve?");
    1.28 +
    1.29 +  [{}, {}, {}, {}, {}].reduce(function(a, b, c, d) { return new Promise(function(r1, r2) { throw a; }); });
    1.30 +  ok(true, "No leaks with exception?");
    1.31 +
    1.32 +  [{}, {}, {}, {}, {}].reduce(function(a, b, c, d) { return new Promise(function(r1, r2) { }); });
    1.33 +  ok(true, "No leaks with empty promise?");
    1.34 +
    1.35 +  SimpleTest.finish();
    1.36 +}
    1.37 +
    1.38 +SimpleTest.waitForExplicitFinish();
    1.39 +runTest();
    1.40 +// -->
    1.41 +</script>
    1.42 +</pre>
    1.43 +</body>
    1.44 +</html>

mercurial