test_bug978260.html (816B)
1 <!-- 2 Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/publicdomain/zero/1.0/ 4 --> 5 <!DOCTYPE HTML> 6 <html> 7 <head> 8 <title>Test for DOM Worker Threads</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 11 </head> 12 <body> 13 <p id="display"></p> 14 <div id="content" style="display: none"></div> 15 <pre id="test"> 16 <script class="testbody" type="text/javascript"> 17 18 SimpleTest.waitForExplicitFinish(); 19 20 var xhr = new XMLHttpRequest(); 21 xhr.onload = function () { 22 var worker = new Worker("bug978260_worker.js"); 23 worker.onmessage = function(event) { 24 is(event.data, "loaded"); 25 SimpleTest.finish(); 26 } 27 } 28 29 xhr.open('GET', '/', false); 30 xhr.send(); 31 32 </script> 33 </pre> 34 </body> 35 </html>