| popupWindow = window.open("resources/test-results-page.html"); |
| console.log("created popup window"); |
| popupWindow.onload = () => { |
| let a = popupWindow.document.querySelectorAll("a[href='fast/multicol/crash-when-spanner-candidate-is-out-of-flow-crash-log.txt']")[0]; |
| console.log(popupWindow.location.href); |
| a.href = "empty-text.txt"; |
| let priorHistoryLength = popupWindow.history.length; |
| console.log("called click()"); |
| function checkNavigated() { |
| if (popupWindow.history.length !== (priorHistoryLength + 1)) { |
| setTimeout(checkNavigated, 100); |
| console.log(popupWindow.location.href); |
| popupWindow.history.back(); |
| console.log("setting timer to notifyDone"); |
| console.log(popupWindow.location.href); |
| console.log("calling notifydone"); |
| setTimeout(checkNavigated, 100); |
| <a onclick="run()"> click me </a> |