small-payload.https.window.js (726B)
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 {HTTPS_ORIGIN} = get_host_info(); 7 const SMALL_REQUEST_BODY_SIZE = 20; 8 9 for (const dataType in BeaconDataType) { 10 // In a same-origin iframe, test making a POST request with small payload. 11 parallelPromiseTest( 12 async _ => await loadFetchLaterIframe(HTTPS_ORIGIN, { 13 activateAfter: 0, 14 method: 'POST', 15 bodyType: dataType, 16 bodySize: SMALL_REQUEST_BODY_SIZE, 17 }), 18 `fetchLater() accepts payload[size=${ 19 SMALL_REQUEST_BODY_SIZE}] in a POST request body of ${ 20 dataType} in same-origin iframe.`); 21 }