addLoadEvent(function() { var w = new Worker("onLine_worker.js");
w.onmessage = function(e) {
if (e.data.type === 'ready') {
// XXX Important trick here.
//
// Setting iosvc.offline would trigger a sync notifyObservers call, and if
// there exists a preloaded about:newtab (see tabbrowser._handleNewTab),
// that tab will be notified.
//
// This implies a sync call across different tabGroups, and will hit the
// assertion in SchedulerGroup::ValidateAccess(). So use executeSoon to
// re-dispatch an unlabeled runnable to the event queue.
SpecialPowers.executeSoon(doTest);
} else if (e.data.type === 'ok') {
ok(e.data.test, e.data.message);
} else if (e.data.type === 'finished') {
SimpleTest.finish();
}
}
function doTest() { var iosvc = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
.getService(SpecialPowers.Ci.nsIIOService);
iosvc.manageOfflineStatus = false;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.