tor-browser

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

network-error.https.tentative.sub.html (1185B)


      1 <!DOCTYPE html>
      2 <title>Web Bundle fetching failed due to a network 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 from a non-existent host, which makes
     17    // Web Bundle fetching fail due to a network error. The intent of is to check if
     18    // failing to fetch a WebBundle also makes subresource fetch requests fail.
     19    promise_test(async () => {
     20      const prefix = "https://{{hosts[][nonexistent]}}/";
     21      const resources = [prefix + "resource.js"];
     22      await addWebBundleElementAndWaitForError(
     23        prefix + "non-existing.wbn",
     24        resources
     25      );
     26 
     27      // Can not fetch a subresource because Web Bundle fetch failed.
     28      await fetchAndWaitForReject(prefix + "resource.js");
     29    }, "Subresource fetch requests for non-existing Web Bundle should fail.");
     30  </script>
     31 </body>