зеркало из https://github.com/mozilla/gecko-dev.git
Bug 942520 - Fix intermittent browser_sanitizeDialog.js failures by accounting for async Sanitizer window initialization r=mak
This commit is contained in:
Родитель
6901fe4a13
Коммит
01b12bf7b9
|
@ -402,17 +402,22 @@ var gAllTests = [
|
|||
// left to clear, the checkbox will be disabled.
|
||||
var cb = this.win.document.querySelectorAll(
|
||||
"#itemList > [preference='privacy.cpd.formdata']");
|
||||
ok(cb.length == 1 && cb[0].disabled && !cb[0].checked,
|
||||
"There is no formdata history, checkbox should be disabled and be " +
|
||||
"cleared to reduce user confusion (bug 497664).");
|
||||
|
||||
var cb = this.win.document.querySelectorAll(
|
||||
"#itemList > [preference='privacy.cpd.history']");
|
||||
ok(cb.length == 1 && !cb[0].disabled && cb[0].checked,
|
||||
"There is no history, but history checkbox should always be enabled " +
|
||||
"and will be checked from previous preference.");
|
||||
// Wait until the checkbox is disabled. This is done asynchronously
|
||||
// from Sanitizer.init() as FormHistory.count() is a purely async API.
|
||||
promiseWaitForCondition(() => cb[0].disabled).then(() => {
|
||||
ok(cb.length == 1 && cb[0].disabled && !cb[0].checked,
|
||||
"There is no formdata history, checkbox should be disabled and be " +
|
||||
"cleared to reduce user confusion (bug 497664).");
|
||||
|
||||
this.acceptDialog();
|
||||
cb = this.win.document.querySelectorAll(
|
||||
"#itemList > [preference='privacy.cpd.history']");
|
||||
ok(cb.length == 1 && !cb[0].disabled && cb[0].checked,
|
||||
"There is no history, but history checkbox should always be enabled " +
|
||||
"and will be checked from previous preference.");
|
||||
|
||||
this.acceptDialog();
|
||||
});
|
||||
}
|
||||
wh.open();
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче