зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1072320 - Intermittent browser_action_searchengine.js | Test timed out - expected PASS. r=Mossop,mak
--HG-- extra : transplant_source : r%F0%95%94%5C%A4%A7%BE%28%0D%27J%A3E%12%8A%8CSN%91
This commit is contained in:
Родитель
d240e00242
Коммит
d31c4e8e2f
|
@ -102,7 +102,9 @@ skip-if = os == "linux" # Bug 924307
|
|||
skip-if = e10s # Bug ?????? - no about:home support yet
|
||||
[browser_aboutSyncProgress.js]
|
||||
[browser_action_keyword.js]
|
||||
skip-if = os == "linux" # Bug 1073339 - Investigate autocomplete test unreliability on Linux
|
||||
[browser_action_searchengine.js]
|
||||
skip-if = os == "linux" # Bug 1073339 - Investigate autocomplete test unreliability on Linux
|
||||
[browser_addKeywordSearch.js]
|
||||
skip-if = e10s
|
||||
[browser_alltabslistener.js]
|
||||
|
|
|
@ -8,9 +8,6 @@ function* promise_first_result(inputText) {
|
|||
gURLBar.value = inputText.slice(0, -1);
|
||||
EventUtils.synthesizeKey(inputText.slice(-1) , {});
|
||||
yield promiseSearchComplete();
|
||||
// On Linux, the popup may or may not be open at this stage. So we need
|
||||
// additional checks to ensure we wait long enough.
|
||||
yield promisePopupShown(gURLBar.popup);
|
||||
|
||||
let firstResult = gURLBar.popup.richlistbox.firstChild;
|
||||
return firstResult;
|
||||
|
|
|
@ -6,9 +6,6 @@ function* check_a11y_label(inputText, expectedLabel) {
|
|||
gURLBar.value = inputText.slice(0, -1);
|
||||
EventUtils.synthesizeKey(inputText.slice(-1) , {});
|
||||
yield promiseSearchComplete();
|
||||
// On Linux, the popup may or may not be open at this stage. So we need
|
||||
// additional checks to ensure we wait long enough.
|
||||
yield promisePopupShown(gURLBar.popup);
|
||||
|
||||
ok(gURLBar.popup.richlistbox.children.length > 1, "Should get at least 2 results");
|
||||
let result = gURLBar.popup.richlistbox.children[1];
|
||||
|
|
|
@ -740,23 +740,28 @@ function promisePopupHidden(popup) {
|
|||
return promisePopupEvent(popup, "hidden");
|
||||
}
|
||||
|
||||
// NOTE: If you're using this, and attempting to interact with one of the
|
||||
// autocomplete results, your test is likely to be unreliable on Linux.
|
||||
// See bug 1073339.
|
||||
let gURLBarOnSearchComplete = null;
|
||||
function promiseSearchComplete() {
|
||||
info("Waiting for onSearchComplete");
|
||||
let deferred = Promise.defer();
|
||||
|
||||
if (!gURLBarOnSearchComplete) {
|
||||
gURLBarOnSearchComplete = gURLBar.onSearchComplete;
|
||||
registerCleanupFunction(() => {
|
||||
gURLBar.onSearchComplete = gURLBarOnSearchComplete;
|
||||
});
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
if (!gURLBarOnSearchComplete) {
|
||||
gURLBarOnSearchComplete = gURLBar.onSearchComplete;
|
||||
registerCleanupFunction(() => {
|
||||
gURLBar.onSearchComplete = gURLBarOnSearchComplete;
|
||||
});
|
||||
}
|
||||
|
||||
gURLBar.onSearchComplete = function () {
|
||||
ok(gURLBar.popupOpen, "The autocomplete popup is correctly open");
|
||||
gURLBarOnSearchComplete.apply(gURLBar);
|
||||
deferred.resolve();
|
||||
}
|
||||
|
||||
return deferred.promise;
|
||||
gURLBar.onSearchComplete = function () {
|
||||
ok(gURLBar.popupOpen, "The autocomplete popup is correctly open");
|
||||
gURLBarOnSearchComplete.apply(gURLBar);
|
||||
resolve();
|
||||
}
|
||||
}).then(() => {
|
||||
// On Linux, the popup may or may not be open at this stage. So we need
|
||||
// additional checks to ensure we wait long enough.
|
||||
return promisePopupShown(gURLBar.popup);
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче