зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1320994 - Increase retries for screensharing preview window. r=florian
MozReview-Commit-ID: IPnLWPT8SNP --HG-- extra : rebase_source : 21b082ae29fed7332ecafcd500d6cb8e25e42217
This commit is contained in:
Родитель
7b778ab6a6
Коммит
da339f960b
|
@ -55,7 +55,7 @@ var gTests = [
|
|||
menulist.getItemAtIndex(2).doCommand();
|
||||
ok(!document.getElementById("webRTC-all-windows-shared").hidden,
|
||||
"the 'all windows will be shared' warning should now be visible");
|
||||
yield promiseWaitForCondition(() => !document.getElementById("webRTC-preview").hidden);
|
||||
yield promiseWaitForCondition(() => !document.getElementById("webRTC-preview").hidden, 100);
|
||||
ok(!document.getElementById("webRTC-preview").hidden,
|
||||
"the preview area is visible");
|
||||
ok(!document.getElementById("webRTC-previewWarning").hidden,
|
||||
|
|
|
@ -30,9 +30,9 @@ function waitForCondition(condition, nextTest, errorMsg, retryTimes) {
|
|||
var moveOn = function() { clearInterval(interval); nextTest(); };
|
||||
}
|
||||
|
||||
function promiseWaitForCondition(aConditionFn) {
|
||||
function promiseWaitForCondition(aConditionFn, retryTimes) {
|
||||
let deferred = Promise.defer();
|
||||
waitForCondition(aConditionFn, deferred.resolve, "Condition didn't pass.");
|
||||
waitForCondition(aConditionFn, deferred.resolve, "Condition didn't pass.", retryTimes);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче