Bug 1027221 - Test that promises can be resolved with a PermanentAtom string. r=terrence, a=sledru
☠☠ backed out by 4851cd40200f ☠ ☠
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 18 Jun 2014 14:36:22 -0400
changeset 207517 4856bfe6102b40653caf7dc1ceabe6ef5ad3fae4
parent 207516 9052bf4c9948a0bb9a82f052629a0986e8411d47
child 207518 7d454f6db4d5a0e16e71d922b8d734ea92a85ef8
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence, sledru
bugs1027221
milestone32.0a2
Bug 1027221 - Test that promises can be resolved with a PermanentAtom string. r=terrence, a=sledru
dom/workers/test/mochitest.ini
dom/workers/test/test_promise_resolved_with_string.html
--- a/dom/workers/test/mochitest.ini
+++ b/dom/workers/test/mochitest.ini
@@ -116,16 +116,17 @@ skip-if = (toolkit == 'gonk' && debug) #
 [test_longThread.html]
 [test_multi_sharedWorker.html]
 [test_multi_sharedWorker_lifetimes.html]
 [test_navigator.html]
 [test_newError.html]
 [test_onLine.html]
 skip-if = (toolkit == 'gonk' && debug) #debug-only failure
 [test_promise.html]
+[test_promise_resolved_with_string.html]
 [test_recursion.html]
 [test_recursiveOnerror.html]
 [test_relativeLoad.html]
 skip-if = buildapp == 'b2g' # b2g(Failed to load script: relativeLoad_import.js) b2g-debug(Failed to load script: relativeLoad_import.js) b2g-desktop(Failed to load script: relativeLoad_import.js)
 [test_resolveWorker-assignment.html]
 [test_resolveWorker.html]
 [test_rvals.html]
 [test_sharedWorker.html]
new file mode 100644
--- /dev/null
+++ b/dom/workers/test/test_promise_resolved_with_string.html
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1027221
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 1027221</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <script type="application/javascript">
+
+  /** Test for Bug 1027221 **/
+    // Set up a permanent atom
+    SimpleTest.waitForExplicitFinish();
+    var x = "x";
+    // Trigger some incremental gc
+    SpecialPowers.Cu.getJSTestingFunctions().gcslice(0);
+
+    // Kick off a worker that uses this same atom
+    var w = new Worker("data:text/plain,Promise.resolve('x').then(function() { postMessage(1); });");
+    // Maybe trigger some more incremental gc
+    SpecialPowers.Cu.getJSTestingFunctions().gcslice(0);
+
+    w.onmessage = function() {
+      ok(true, "Got here");
+      SimpleTest.finish();
+    };
+
+  </script>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1027221">Mozilla Bug 1027221</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+</pre>
+</body>
+</html>