tor-browser

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

sxg-inner-url-bom.tentative.html (876B)


      1 <!DOCTYPE html>
      2 <title>SignedHTTPExchange's fallback url must not have UTF-8 BOM</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().HTTP_ORIGIN + '/signed-exchange/resources/sxg/sxg-inner-url-bom.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's fallback url must not have UTF-8 BOM");
     23 
     24 </script>
     25 </body>