Revision control

1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="../resources/js-test.js"></script>
5
</head>
6
<body>
7
<script>
8
description("Basic testing for beforeprint / afterprint events");
9
jsTestIsAsync = true;
10
let receivedBeforePrintEvent = false;
11
12
addEventListener("beforeprint", () => {
13
debug("* Received beforeprint event");
14
receivedBeforePrintEvent = true;
15
});
16
17
addEventListener("afterprint", () => {
18
debug("* Received afterprint event");
19
shouldBeTrue("receivedBeforePrintEvent");
20
finishJSTest();
21
});
22
23
onload = () => {
24
evalAndLog("window.print()");
25
};
26
</script>
27
</body>
28
</html>