зеркало из https://github.com/mozilla/pjs.git
Bug 573259: Wait to go online before running browser_relative.js. r=robstrong, a=tests
This commit is contained in:
Родитель
010a9e92b9
Коммит
67f03f5702
|
@ -25,6 +25,16 @@ function download_progress(addon, value, maxValue) {
|
|||
}
|
||||
|
||||
function finish_test(count) {
|
||||
function wait_for_online() {
|
||||
info("Checking if the browser is still offline...");
|
||||
var request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
|
||||
createInstance(Ci.nsIXMLHttpRequest);
|
||||
request.open("GET", TESTROOT + "empty.xpi", true);
|
||||
request.onerror = wait_for_online;
|
||||
request.onload = Harness.finish;
|
||||
request.send(null);
|
||||
}
|
||||
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
try {
|
||||
Services.prefs.setBoolPref("browser.offline", false);
|
||||
|
@ -35,5 +45,5 @@ function finish_test(count) {
|
|||
Services.perms.remove("example.com", "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
wait_for_online();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче