summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/signed-exchange/sxg-hsts.tentative.html
blob: 6024e2879e7f0669ddd6e0ea40689ebd8cfbefaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<title>Loading SignedHTTPExchange with strict-transport-security must fail</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="./resources/sxg-util.js"></script>
<body>
<script>
promise_test(async (t) => {
  const sxgUrl = get_host_info().HTTPS_ORIGIN +
                 '/signed-exchange/resources/sxg/sxg-hsts.sxg';
  const message = await openSXGInIframeAndWaitForMessage(t, sxgUrl);
  const innerURL = innerURLOrigin() +
                   '/signed-exchange/resources/inner-url.html';
  assert_equals(message.location, innerURL);
  assert_true(message.is_fallback);
}, 'Loading SignedHTTPExchange with an uncached header ' +
   'Strict-Transport-Security must fail and fallback redirect.');

</script>
</body>