Index: LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html |
diff --git a/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html b/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html |
index f761339956c474f2ba60aa109c3834264f4b7471..55225577ec92b3984a56d96ff3ebdb7ae3fa5f2b 100644 |
--- a/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html |
+++ b/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html |
@@ -7,12 +7,13 @@ |
} |
function checkIfDone() { |
- var url = document.querySelector('iframe').contentWindow.location.href; |
- |
- if (!url) |
- console.log("PASS: Could not read contentWindow.location.href"); |
- else |
+ try { |
+ var url = document.querySelector('iframe').contentWindow.location.href; |
console.log("FAIL: Could read contentWindow.location.href"); |
+ } catch (e) { |
+ console.log("PASS: Access to contentWindow.location.href threw an exception."); |
+ } |
+ |
testRunner.notifyDone(); |
} |
</script> |