зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1447941 - Replace promiseWaitForCondition with TestUtils.waitForCondition in browser_aboutHome_search_searchbar.js r=johannh
This commit is contained in:
Родитель
cae9cf0b13
Коммит
3abf069c75
|
@ -17,7 +17,7 @@ add_task(async function() {
|
|||
isnot(searchInput, doc.activeElement, "Search bar should not be the active element.");
|
||||
|
||||
EventUtils.synthesizeKey("k", { accelKey: true });
|
||||
await promiseWaitForCondition(() => doc.activeElement === searchInput);
|
||||
await TestUtils.waitForCondition(() => doc.activeElement === searchInput);
|
||||
is(searchInput, doc.activeElement, "Search bar should be the active element.");
|
||||
});
|
||||
|
||||
|
|
|
@ -23,12 +23,6 @@ function waitForCondition(condition, nextTest, errorMsg, retryTimes) {
|
|||
var moveOn = function() { clearInterval(interval); nextTest(); };
|
||||
}
|
||||
|
||||
function promiseWaitForCondition(aConditionFn) {
|
||||
return new Promise(resolve => {
|
||||
waitForCondition(aConditionFn, resolve, "Condition didn't pass.");
|
||||
});
|
||||
}
|
||||
|
||||
function whenTabLoaded(aTab, aCallback) {
|
||||
promiseTabLoadEvent(aTab).then(aCallback);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче