chromium/chrome/test/data/printing/prerendering.html

<!doctype html>
<html>
<script>
let firedBeforePrint = false;
let firedAfterPrint = false;
window.addEventListener('beforeprint', function (_) {
  firedBeforePrint = true;
});
window.addEventListener('afterprint', function (_) {
  firedAfterPrint = true;
});
</script>
</html>