Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/imported/wpt/workers/support/ImportScriptsNetworkErr.js |
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/workers/support/ImportScriptsNetworkErr.js b/third_party/WebKit/LayoutTests/imported/wpt/workers/support/ImportScriptsNetworkErr.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8179c8b10013192ae614a74beafca4bcdaa7f6ea |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/workers/support/ImportScriptsNetworkErr.js |
| @@ -0,0 +1,15 @@ |
| +var result = "Fail"; |
| + |
| +try |
| +{ |
| + importScripts("NonExistentFile.js"); |
| +} |
| +catch(ex) |
| +{ |
| + if (ex.code != null && ex.code == ex.NETWORK_ERR) |
| + { |
| + result = "Pass"; |
| + } |
| +} |
| + |
| +postMessage(result); |