| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Allow suborigin in HTTP header</title> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> |
| 7 </head> |
| 8 <body> |
| 9 <script> |
| 10 |
| 11 var tests; |
| 12 var nextTest = function() { |
| 13 var test = tests.shift(); |
| 14 if (test) |
| 15 test(); |
| 16 } |
| 17 |
| 18 tests = [ |
| 19 function() { |
| 20 async_test(function(t) { |
| 21 window.onmessage = t.step_func(function(event) { |
| 22 assert_equals(event.data, 'I am a secret'); |
| 23 t.done(); |
| 24 nextTest(); |
| 25 }); |
| 26 var iframe = document.createElement('iframe'); |
| 27 iframe.src = "resources/iframe-reaches-into-parent.php?suborigin=foo
bar&childsuborigin=foobar"; |
| 28 document.body.appendChild(iframe); |
| 29 }, 'iframe reaches into parent') |
| 30 }, |
| 31 function() { |
| 32 async_test(function(t) { |
| 33 window.onmessage = t.step_func(function(event) { |
| 34 assert_equals(event.data, 'I am a secret'); |
| 35 t.done(); |
| 36 nextTest(); |
| 37 }); |
| 38 var iframe = document.createElement('iframe'); |
| 39 iframe.src = "resources/reach-into-iframe.php?suborigin=foobar&child
suborigin=foobar"; |
| 40 document.body.appendChild(iframe); |
| 41 }, 'Parent reaches into iframe') |
| 42 } |
| 43 ]; |
| 44 |
| 45 nextTest(); |
| 46 </script> |
| 47 </body> |
| 48 </html> |
| OLD | NEW |