tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_offline_status.js (415B)


      1 "use strict";
      2 
      3 function run_test() {
      4  try {
      5    var linkService = Cc[
      6      "@mozilla.org/network/network-link-service;1"
      7    ].getService(Ci.nsINetworkLinkService);
      8 
      9    // The offline status should depends on the link status
     10    Assert.notEqual(Services.io.offline, linkService.isLinkUp);
     11  } catch (e) {
     12    // The network link service might not be available
     13    Assert.equal(Services.io.offline, false);
     14  }
     15 }