OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <meta charset="utf-8"> |
| 4 <title>Verify that strict secure cookies are enforced</title> |
| 5 <script src="/resources/get-host-info.js"></script> |
| 6 <script src="/resources/testharness.js"></script> |
| 7 <script src="/resources/testharnessreport.js"></script> |
| 8 </head> |
| 9 <body> |
| 10 <script> |
| 11 var t = async_test("Verify that strict secure cookies are enforced"); |
| 12 window.onmessage = t.step_func(function(event) { |
| 13 assert_false(event.data, "cookie should not have been set by an insecure URL
"); |
| 14 t.done(); |
| 15 }); |
| 16 |
| 17 function insecureLoaded() { |
| 18 var iframe = document.createElement("iframe"); |
| 19 iframe.src = get_host_info().HTTPS_ORIGIN + |
| 20 "/security/cookies/resources/get-cookie.html"; |
| 21 document.body.appendChild(iframe); |
| 22 } |
| 23 var insecure_frame = document.createElement("iframe"); |
| 24 insecure_frame.onload = insecureLoaded; |
| 25 insecure_frame.src = get_host_info().HTTP_ORIGIN + |
| 26 "/security/cookies/resources/set-a-cookie.php?secure=true&resetcookie=false&no
tifydone=false"; |
| 27 document.body.appendChild(insecure_frame); |
| 28 </script> |
| 29 </body> |
| 30 </html> |
OLD | NEW |