tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

sxg-merkle-integrity-error.tentative.html (866B)


      1 <!DOCTYPE html>
      2 <title>SignedHTTPExchange with payload integrity error</title>
      3 <meta name="timeout" content="long">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/common/get-host-info.sub.js"></script>
      7 <script src="./resources/sxg-util.js"></script>
      8 <body>
      9 <script>
     10 promise_test(async (t) => {
     11  try {
     12    const sxgUrl = get_host_info().HTTPS_ORIGIN + '/signed-exchange/resources/sxg/sxg-merkle-integrity-error.sxg';
     13    const message = await openSXGInIframeAndWaitForMessage(t, sxgUrl);
     14    if (message.is_fallback) {
     15        assert_unreached('Fallback redirect should not have happened');
     16    } else {
     17        assert_unreached('SXG should not have loaded');
     18    }
     19  } catch (e) {
     20    assert_equals(e, 'timeout');
     21  }
     22 }, "SignedHTTPExchange with payload integrity error");
     23 
     24 </script>
     25 </body>