dom/promise/tests/test_bug883683.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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