Index: LayoutTests/security/resources/cannot-read-self-from-file.html |
diff --git a/LayoutTests/security/resources/cannot-read-self-from-file.html b/LayoutTests/security/resources/cannot-read-self-from-file.html |
index d380284c51226a086a9bb2bb68c11bd4bc3246c6..9851f156af272c575aaf74bd6180dbc9fe278ac7 100644 |
--- a/LayoutTests/security/resources/cannot-read-self-from-file.html |
+++ b/LayoutTests/security/resources/cannot-read-self-from-file.html |
@@ -4,12 +4,10 @@ |
<script> |
var req = new XMLHttpRequest(); |
req.open('GET', location); |
-try { |
- req.send(); |
- window.parent.postMessage('FAIL', '*'); |
-} catch (e) { |
- window.parent.postMessage(e.name, '*'); |
+req.onerror = function() { |
+ window.parent.postMessage('PASS', '*'); |
} |
+req.send(); |
</script> |
</head> |
<body> |