Bug 1371142 - Confirm that the page loaded is about:blank before continuing with the test. r=Gijs

This matches the behavior that is implemented in subdialogs.js where the load event handler is not removed until the new location is about:blank.

MozReview-Commit-ID: FZHW6Z63M2M

--HG--
extra : rebase_source : 010d884fb3bfc6dca63035c0125f3c2223847fcc
This commit is contained in:
Jared Wein 2018-07-18 15:40:37 -04:00
parent f4f434b790
commit 382ec3f85e

View File

@ -78,7 +78,9 @@ async function close_subdialog_and_test_generic_end_state(browser, closingFn, cl
frame.contentWindow.arguments[0].acceptCount;
info("waiting for about:blank load");
await ContentTaskUtils.waitForEvent(frame, "load");
await ContentTaskUtils.waitForEvent(frame, "load", false, () => {
return frame.contentWindow.location.href == "about:blank";
});
Assert.notEqual(win.getComputedStyle(subdialog._overlay).visibility, "visible",
"overlay is not visible");