| Index: LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html
|
| diff --git a/LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html b/LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..29029c3c338627cb4d0b07a755e2b8bb0e0d9519
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html
|
| @@ -0,0 +1,48 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<title>Allow suborigin in HTTP header</title>
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +</head>
|
| +<body>
|
| +<script>
|
| +
|
| +var tests;
|
| +var nextTest = function() {
|
| + var test = tests.shift();
|
| + if (test)
|
| + test();
|
| +}
|
| +
|
| +tests = [
|
| + function() {
|
| + async_test(function(t) {
|
| + window.onmessage = t.step_func(function(event) {
|
| + assert_equals(event.data, 'I am a secret');
|
| + t.done();
|
| + nextTest();
|
| + });
|
| + var iframe = document.createElement('iframe');
|
| + iframe.src = "resources/iframe-reaches-into-parent.php?suborigin=foobar&childsuborigin=foobar";
|
| + document.body.appendChild(iframe);
|
| + }, 'iframe reaches into parent')
|
| + },
|
| + function() {
|
| + async_test(function(t) {
|
| + window.onmessage = t.step_func(function(event) {
|
| + assert_equals(event.data, 'I am a secret');
|
| + t.done();
|
| + nextTest();
|
| + });
|
| + var iframe = document.createElement('iframe');
|
| + iframe.src = "resources/reach-into-iframe.php?suborigin=foobar&childsuborigin=foobar";
|
| + document.body.appendChild(iframe);
|
| + }, 'Parent reaches into iframe')
|
| + }
|
| +];
|
| +
|
| +nextTest();
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|