mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 474763: Enable xpinstall test suite and fix switching on/offline. r=bsmedberg
This commit is contained in:
parent
9cc610fb58
commit
fb7c98b73e
@ -50,8 +50,8 @@ include $(DEPTH)/config/autoconf.mk
|
||||
MODULE = xpinstall
|
||||
DIRS = public src
|
||||
|
||||
#ifdef ENABLE_TESTS
|
||||
#DIRS += tests
|
||||
#endif
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -80,6 +80,8 @@ _BROWSER_FILES = harness.js \
|
||||
browser_offline.js \
|
||||
browser_chrome.js \
|
||||
browser_cancel.js \
|
||||
browser_navigateaway.js \
|
||||
browser_navigateaway2.js \
|
||||
unsigned.xpi \
|
||||
signed.xpi \
|
||||
signed2.xpi \
|
||||
|
@ -23,7 +23,17 @@ function test() {
|
||||
}
|
||||
|
||||
function download_progress(addon, value, maxValue) {
|
||||
BrowserOffline.toggleOfflineStatus();
|
||||
var prefs = Components.classes["@mozilla.org/preferences;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService2);
|
||||
|
||||
try {
|
||||
ioService.manageOfflineStatus = false;
|
||||
prefs.setBoolPref("browser.offline", true);
|
||||
ioService.offline = true;
|
||||
} catch (ex) {
|
||||
}
|
||||
}
|
||||
|
||||
function check_xpi_install(addon, status) {
|
||||
@ -31,7 +41,15 @@ function check_xpi_install(addon, status) {
|
||||
}
|
||||
|
||||
function finish_test() {
|
||||
BrowserOffline.toggleOfflineStatus();
|
||||
var prefs = Components.classes["@mozilla.org/preferences;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService2);
|
||||
try {
|
||||
prefs.setBoolPref("browser.offline", false);
|
||||
ioService.offline = false;
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
|
||||
.getService(Components.interfaces.nsIPermissionManager);
|
||||
|
Loading…
Reference in New Issue
Block a user