Index: LayoutTests/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html |
diff --git a/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html b/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html |
index 8e588ecbd44e077d9edb239d2501cd48367661e7..7145cf4bf9a087ab01cfa6aa004fed298ebc3720 100644 |
--- a/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html |
+++ b/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.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> |