Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/cookies/strict-secure-cookies.html

Issue 2623423002: Add console warning and tests for strict secure cookies.
Patch Set: Update comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698