1
0
Fork 0
firefox/testing/web-platform/tests/device-bound-session-credentials/not-secure-connection.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

22 lines
No EOL
912 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>No DBSC if connection is HTTP</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="helper.js" type="module"></script>
<script type="module">
import { expireCookie, waitForCookie, addCookieAndSessionCleanup, setupShardedServerState } from "./helper.js";
promise_test(async t => {
await setupShardedServerState();
const expectedCookieAndValue = "auth_cookie=abcdef0123";
addCookieAndSessionCleanup(t);
// Prompt starting a session, and wait until registration completes.
const loginResponse = await fetch('login.py');
assert_equals(loginResponse.status, 200);
// For HTTP, this call will time out, because the cookie is never set.
await waitForCookie(expectedCookieAndValue, /*expectCookie=*/false);
}, "Try to establish a session over HTTP");
</script>