Index: LayoutTests/http/tests/security/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php |
diff --git a/LayoutTests/http/tests/security/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php b/LayoutTests/http/tests/security/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1523b08ef05895ae660ee58b3d08a8932b12c17f |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php |
@@ -0,0 +1,23 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<title>Block frame not in suborigin from accessing a frame in a suborigin</title> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+</head> |
+<script> |
+window.onmessage = function() { |
+ var iframe = document.getElementById('iframe'); |
+ var secret = ''; |
+ try { |
+ secret = iframe.contentWindow.secret; |
+ assert_unreached(); |
+ done(); |
+ } catch(e) { |
+ assert_equals(secret, "", "The parent frame should not be able to get the secret value from the child iframe."); |
+ done(); |
+ }; |
+}; |
+</script> |
+<iframe id="iframe" src="resources/childsuborigin.php?suborigin=foobar"></iframe> |
+</html> |