| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 var x = ''; | |
| 3 var exception; | |
| 4 try { | |
| 5 importScripts('data:text/javascript,x+="first script successful. "', | |
| 6 'data:text/javascript,x+="FAIL (second script). "; for(;) break;
', // doesn't compile | |
| 7 'data:text/javascript,x+="FAIL (third script)"'); | |
| 8 } catch(ex) { | |
| 9 if (ex instanceof SyntaxError) | |
| 10 exception = true; | |
| 11 else | |
| 12 exception = String(ex); | |
| 13 } | |
| 14 postMessage([x, exception]); | |
| 15 /* | |
| 16 --> | |
| 17 <!doctype html> | |
| 18 <title>importScripts broken script</title> | |
| 19 <script src="/resources/testharness.js"></script> | |
| 20 <script src="/resources/testharnessreport.js"></script> | |
| 21 <div id="log"></div> | |
| 22 <script> | |
| 23 async_test(function() { | |
| 24 var worker = new Worker('#'); | |
| 25 worker.onmessage = this.step_func(function(e) { | |
| 26 assert_equals(e.data[0], "first script successful. "); | |
| 27 assert_true(e.data[1], 'expected SyntaxError'); | |
| 28 this.done(); | |
| 29 }); | |
| 30 }); | |
| 31 </script> | |
| 32 <!-- | |
| 33 */ | |
| 34 //--> | |
| OLD | NEW |