fune/netwerk/test/browser/early_hint_pixel_count.sjs
Manuel Bucher d9951694c2 Bug 1753730 - Test that the cached image from the early hint preload is used r=necko-reviewers,ckerschb,dragana,kershaw
* Test that the preloaded image is actually used and that no preload requests
  are made if the resource shouldn't be preloaded

Differential Revision: https://phabricator.services.mozilla.com/D139740
2022-05-11 15:41:39 +00:00

9 lines
317 B
JavaScript

"use strict";
function handleRequest(request, response) {
if (request.hasHeader("X-Early-Hint-Count-Start")) {
setSharedState("earlyHintCount", JSON.stringify({ hinted: 0, normal: 0 }));
}
response.setHeader("Content-Type", "application/json", false);
response.write(getSharedState("earlyHintCount"));
}