not-secure-connection.html (867B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="helper.js" type="module"></script> 6 7 <script type="module"> 8 import { expireCookie, waitForCookie, addCookieAndSessionCleanup, setupShardedServerState } from "./helper.js"; 9 10 promise_test(async t => { 11 await setupShardedServerState(); 12 const expectedCookieAndValue = "auth_cookie=abcdef0123"; 13 addCookieAndSessionCleanup(t); 14 15 // Prompt starting a session, and wait until registration completes. 16 const loginResponse = await fetch('login.py'); 17 assert_equals(loginResponse.status, 200); 18 // For HTTP, this call will time out, because the cookie is never set. 19 await waitForCookie(expectedCookieAndValue, /*expectCookie=*/false); 20 }, "Try to establish a session over HTTP"); 21 </script>