tor-browser

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

small-payload.https.window.js (600B)


      1 // META: script=/common/get-host-info.sub.js
      2 // META: script=/common/utils.js
      3 // META: script=/fetch/fetch-later/resources/fetch-later-helper.js
      4 'use strict';
      5 
      6 const SMALL_REQUEST_BODY_SIZE = 20;
      7 
      8 for (const dataType in BeaconDataType) {
      9  // Test making a POST request with small payload.
     10  parallelPromiseTest(
     11      async _ => expectFetchLater({
     12        activateAfter: 0,
     13        method: 'POST',
     14        body:
     15            makeBeaconData(generatePayload(SMALL_REQUEST_BODY_SIZE), dataType),
     16      }),
     17      `fetchLater() accepts small payload in a POST request body of ${
     18          dataType}.`);
     19 }