OLD | NEW |
| (Empty) |
1 <!-- | |
2 var xhr = new XMLHttpRequest(); | |
3 var log = ''; | |
4 xhr.onreadystatechange = function(e) { | |
5 if (this.readyState == 4) { | |
6 if (this.responseXML != null) | |
7 log += 'responseXML was not null. '; | |
8 if (this.responseText != '<x>foo</x>') | |
9 log += 'responseText was ' + this.responseText + ', expected <x>foo</x>. '
; | |
10 postMessage(log); | |
11 } | |
12 } | |
13 xhr.open('GET', '001-1.xml', true); | |
14 xhr.send(); | |
15 /* | |
16 --> | |
17 <!doctype html> | |
18 <title>async XMLHttpRequest in dedicated worker</title> | |
19 <script src="/resources/testharness.js"></script> | |
20 <script src="/resources/testharnessreport.js"></script> | |
21 <div id=log></div> | |
22 <script> | |
23 var t = async_test(); | |
24 function runtest() { | |
25 var worker = new Worker('#'); | |
26 worker.onmessage = this.step_func(function(e) { | |
27 assert_equals(e.data, ''); | |
28 this.done(); | |
29 }); | |
30 } | |
31 </script> | |
32 <iframe src=001-1.xml onload="t.step(runtest);"></iframe> | |
33 <!-- | |
34 */ | |
35 //--> | |
OLD | NEW |