mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 623242: Fix test_localfile to wait for failure rather than popup. r=gavin, a=tests
This commit is contained in:
parent
a4901151d2
commit
687c00cce4
@ -432,9 +432,13 @@ function test_url() {
|
||||
},
|
||||
|
||||
function test_localfile() {
|
||||
// Wait for the complete notification
|
||||
wait_for_notification(function(aPanel) {
|
||||
let notification = aPanel.childNodes[0];
|
||||
// Wait for the install to fail
|
||||
Services.obs.addObserver(function() {
|
||||
Services.obs.removeObserver(arguments.callee, "addon-install-failed");
|
||||
|
||||
// Wait for the browser code to add the failure notification
|
||||
executeSoon(function() {
|
||||
let notification = PopupNotifications.panel.childNodes[0];
|
||||
is(notification.id, "addon-install-failed-notification", "Should have seen the install fail");
|
||||
is(notification.getAttribute("label"),
|
||||
"This add-on could not be installed because it appears to be corrupt.",
|
||||
@ -443,6 +447,7 @@ function test_localfile() {
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
}, "addon-install-failed", false);
|
||||
|
||||
var cr = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Components.interfaces.nsIChromeRegistry);
|
||||
|
Loading…
Reference in New Issue
Block a user