| <!-- |
| var ran = false; |
| var threw = false; |
| var code = undefined; |
| try { |
| importScripts('data:text/javascript,ran=true','http://foo bar'); |
| } catch(e) { |
| threw = true; |
| code = e.code; |
| } |
| postMessage([ran, threw, code]); |
| /* |
| --> |
| <!doctype html> |
| <title>importScripts resolving urls</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <div id="log"></div> |
| <script> |
| async_test(function() { |
| var worker = new Worker('#'); |
| worker.onmessage = this.step_func(function(e) { |
| assert_false(e.data[0], 'first argument to importScripts ran'); |
| assert_true(e.data[1], 'space in URL in second argument to importScripts did not throw'); |
| assert_equals(e.data[2], 12, 'exception code'); |
| this.done(); |
| }); |
| }); |
| </script> |
| <!-- |
| */ |
| //--> |