Bug 1885602 - Part 2: Add a MozillaAccountMenuButton composable for the menu redesign...
[gecko.git] / dom / xhr / tests / test_worker_xhr_cors_redirect.html
blob777c31b1c22252eea6f411510fd4bc77352df05f
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Test for Bug 1206121</title>
6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
8 <script type="application/javascript">
10 "use strict";
12 var worker = new Worker("worker_xhr_cors_redirect.js");
13 worker.onmessage = function(e) {
14 is(e.data, 200, "We want to read 200 here.");
15 runTests();
18 var tests = [ 'http://example.com/tests/dom/xhr/tests/worker_xhr_cors_redirect.sjs',
19 'http://example.com/tests/dom/xhr/tests/worker_xhr_cors_redirect.sjs?redirect',
20 'worker_xhr_cors_redirect.sjs?redirect' ];
21 function runTests() {
22 if (!tests.length) {
23 SimpleTest.finish();
24 return;
27 worker.postMessage(tests.shift());
30 SimpleTest.waitForExplicitFinish();
31 </script>
32 </head>
33 <body onload="runTests()">
34 </body>
35 </html>