tor-browser

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

not-found.https.tentative.html (1229B)


      1 <!DOCTYPE html>
      2 <title>Web Bundle fetching failed due to not found error</title>
      3 <link
      4  rel="help"
      5  href="https://github.com/WICG/webpackage/blob/main/explainers/subresource-loading.md"
      6 />
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <script src="../resources/test-helpers.js"></script>
     10 <body>
     11  <script>
     12    setup(() => {
     13      assert_true(HTMLScriptElement.supports("webbundle"));
     14    });
     15 
     16    // This test uses a non-existing WebBundle,
     17    //   /web-bundle/resources/wbn/cors/non-existing.wbn.
     18    // The intent of this test is to check if failing to fetch a WebBundle due to
     19    // not found error also makes subresource fetch requests fail.
     20    promise_test(async () => {
     21      const prefix = "/web-bundle/resources/wbn/";
     22      const resources = [prefix + "resource.js"];
     23      const element = await createWebBundleElement(
     24        prefix + "non-existing.wbn",
     25        resources
     26      );
     27      document.body.appendChild(element);
     28 
     29      // Can not fetch a subresource because Web Bundle fetch failed.
     30      await fetchAndWaitForReject(prefix + "resource.js");
     31    }, "Subresource fetch requests for non-existing Web Bundle should fail.");
     32  </script>
     33 </body>