"use strict"; const TESTFRAME_QUERY_LARGE_ALLOCATION_WITH_NO_CSP = ` Bug 1555050 - Test CSP Navigation using ReloadInFreshProcess testframe
`; const TESTFRAME_QUERY_LARGE_ALLOCATION_WITH_CSP = ` Bug 1555050 - Test CSP Navigation using ReloadInFreshProcess testframe
`; const LARGE_ALLOCATION = ` Bug 1555050 - Test CSP Navigation using ReloadInFreshProcess largeAllocation
`; function handleRequest(request, response) { // avoid confusing cache behaviors response.setHeader("Cache-Control", "no-cache", false); var queryString = request.queryString; if (queryString == "testframe_with_csp") { response.setHeader("Content-Security-Policy", "upgrade-insecure-requests", false); response.write(TESTFRAME_QUERY_LARGE_ALLOCATION_WITH_NO_CSP); return; } if (queryString == "testframe_with_no_csp") { response.write(TESTFRAME_QUERY_LARGE_ALLOCATION_WITH_CSP); return; } if (queryString == "largeAllocation_with_csp") { response.setHeader("Content-Security-Policy", "upgrade-insecure-requests", false); response.setHeader("Large-Allocation", "0", false); response.write(LARGE_ALLOCATION); return; } if (queryString == "largeAllocation_with_no_csp") { response.setHeader("Large-Allocation", "0", false); response.write(LARGE_ALLOCATION); return; } // we should never get here, but just in case return something unexpected response.write("do'h"); }