Bug 1303298 - Work around intermittent browser_mixed_content_cert_override.js. r=nhnt11

MozReview-Commit-ID: 5srDm58jz5M

--HG--
extra : rebase_source : 5e8a53e59bab056072f8ccc55f778e8cfdfab11a
This commit is contained in:
Johann Hofmann 2016-11-29 18:01:35 +01:00
Родитель dcbd6cadd3
Коммит cb0fb60d0d
1 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -1023,8 +1023,17 @@ function* loadBadCertPage(url) {
"cert-exception-ui-ready", false);
});
yield BrowserTestUtils.loadURI(gBrowser.selectedBrowser, url);
yield promiseErrorPageLoaded(gBrowser.selectedBrowser);
// Sometimes clearing the cert override is not immediately picked up,
// so we reload until we are on an actual cert error page.
yield BrowserTestUtils.waitForCondition(function*() {
yield BrowserTestUtils.loadURI(gBrowser.selectedBrowser, url);
yield promiseErrorPageLoaded(gBrowser.selectedBrowser);
let isErrorPage = yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
return content.document.documentURI.startsWith("about:certerror");
});
return isErrorPage;
}, "Could not load error page", 1000);
yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
content.document.getElementById("exceptionDialogButton").click();
});