dom/promise/tests/test_bug883683.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!--
     2   Any copyright is dedicated to the Public Domain.
     3   http://creativecommons.org/publicdomain/zero/1.0/
     4 -->
     5 <html>
     6 <head>
     7   <title>Promise - bug 883683</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10 </head>
    11 <body>
    12 <p id="display"></p>
    13 <div id="content" style="display: none">
    15 </div>
    16 <pre id="test">
    17 <script type="application/javascript"><!--
    19 function runTest() {
    20   [{}, {}, {}, {}, {}].reduce(Promise.reject);
    21   ok(true, "No leaks with reject?");
    23   [{}, {}, {}, {}, {}].reduce(Promise.resolve);
    24   ok(true, "No leaks with resolve?");
    26   [{}, {}, {}, {}, {}].reduce(function(a, b, c, d) { return new Promise(function(r1, r2) { throw a; }); });
    27   ok(true, "No leaks with exception?");
    29   [{}, {}, {}, {}, {}].reduce(function(a, b, c, d) { return new Promise(function(r1, r2) { }); });
    30   ok(true, "No leaks with empty promise?");
    32   SimpleTest.finish();
    33 }
    35 SimpleTest.waitForExplicitFinish();
    36 runTest();
    37 // -->
    38 </script>
    39 </pre>
    40 </body>
    41 </html>

mercurial