dom/xhr/tests/test_worker_xhr_implicit_cancel.html
author Jan de Mooij <jdemooij@mozilla.com>
Wed, 13 Feb 2019 06:41:44 +0000
changeset 516733 8c306186cbd7672259b3a730471cfcbe44a9b0d0
parent 342795 55a63a62c0dd798ba7ea9c5ab08d49a48588a0d4
child 528458 ba6f655fd68963530c866d0d4a48c3db3d307777
permissions -rw-r--r--
Bug 1526588 - Fix some issues with js::GetFirstGlobalInCompartment and XPCWrappedNativeScope::UpdateWeakPointersInAllScopesAfterGC. r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D19493

<!--
  Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE HTML>
<html>
<!--
Tests of DOM Worker Threads XHR(Bug 450452 )
-->
<head>
  <title>Test for DOM Worker Threads XHR (Bug 450452 )</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=450452">DOM Worker Threads XHR (Bug 450452)</a>
<p id="display"></p>
<div id="content" style="display: none">

</div>
<pre id="test">
<script class="testbody" type="text/javascript">

  var worker = new Worker("xhr_implicit_cancel_worker.js");

  worker.onmessage = function(event) {
    is(event.target, worker, "Expected event target for message");
    ok(true, "Worker didn't have an error");
    SimpleTest.finish();
  };

  worker.onerror = function(event) {
    is(event.target, worker, "Expected event target for error");
    ok(false, "Worker had an error:" + event.message);
    SimpleTest.finish();
  }

  SimpleTest.waitForExplicitFinish();

</script>
</pre>
</body>
</html>