2 <p>Test that loading the worker's script does not allow a cross origin redirect (<a href="https://bugs.webkit.org/show_bug.cgi?id=26146">bug 26146</a>)</p>
7 document.getElementById("result").innerHTML += message + "<br>";
10 if (window.layoutTestController) {
11 layoutTestController.dumpAsText();
12 layoutTestController.waitUntilDone();
15 var worker = new Worker('/resources/redirect.php?url=http://localhost:8000/workers/resources/worker-redirect-target.js');
16 worker.onerror = function(evt) {
17 log("SUCCESS: threw error when attempting to redirected cross origin while loading the worker script.");
18 if (window.layoutTestController)
19 layoutTestController.notifyDone();
21 worker.onmessage = function(evt) {
22 log("FAIL: executed script when redirect cross origin.");
23 if (window.layoutTestController)
24 layoutTestController.notifyDone();