dom/workers/test/test_promise_resolved_with_string.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/workers/test/test_promise_resolved_with_string.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=1027221
     1.8 +-->
     1.9 +<head>
    1.10 +  <meta charset="utf-8">
    1.11 +  <title>Test for Bug 1027221</title>
    1.12 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.14 +  <script type="application/javascript">
    1.15 +
    1.16 +  /** Test for Bug 1027221 **/
    1.17 +    // Set up a permanent atom
    1.18 +    SimpleTest.waitForExplicitFinish();
    1.19 +    var x = "x";
    1.20 +    // Trigger some incremental gc
    1.21 +    SpecialPowers.Cu.getJSTestingFunctions().gcslice(0);
    1.22 +
    1.23 +    // Kick off a worker that uses this same atom
    1.24 +    var w = new Worker("data:text/plain,Promise.resolve('x').then(function() { postMessage(1); });");
    1.25 +    // Maybe trigger some more incremental gc
    1.26 +    SpecialPowers.Cu.getJSTestingFunctions().gcslice(0);
    1.27 +
    1.28 +    w.onmessage = function() {
    1.29 +      ok(true, "Got here");
    1.30 +      SimpleTest.finish();
    1.31 +    };
    1.32 +
    1.33 +  </script>
    1.34 +</head>
    1.35 +<body>
    1.36 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1027221">Mozilla Bug 1027221</a>
    1.37 +<p id="display"></p>
    1.38 +<div id="content" style="display: none">
    1.39 +
    1.40 +</div>
    1.41 +<pre id="test">
    1.42 +</pre>
    1.43 +</body>
    1.44 +</html>

mercurial