(docName, lifecycleEventName)
| 7 | }; |
| 8 | |
| 9 | const markTime = (docName, lifecycleEventName) => { |
| 10 | // Calculating these values before the below `mark` invocation ensures that delays in |
| 11 | // reaching across to the other window object doesn't interfere with the correctness |
| 12 | // of the test. |
| 13 | const dateNow = Date.now(); |
| 14 | const performanceNow = performance.now(); |
| 15 | |
| 16 | window.opener.mark({ |
| 17 | docName, |
| 18 | lifecycleEventName, |
| 19 | performanceNow: performanceNow, |
| 20 | dateNow: dateNow |
| 21 | }); |
| 22 | }; |
| 23 | |
| 24 | const setupUnloadPrompt = (docName, msg) => { |
| 25 | window.addEventListener("beforeunload", ev => { |
no test coverage detected