summaryrefslogtreecommitdiffstats
path: root/dom/xhr/tests/test_sharedworker_xhr.html
blob: c0c43bcb26d71a9c6a1a3ad92a997132a069352f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE HTML>
<html>
<head>
  <title>Test for SharedWorker Threads XHR</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<script class="testbody" type="text/javascript">

var worker = new SharedWorker("xhr_sharedworker.js");

worker.port.onmessage = function(event) {
  is(event.data, "done", "Got correct result");
  SimpleTest.finish();
}
worker.port.postMessage("worker_testXHR.txt");

SimpleTest.waitForExplicitFinish();

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