summaryrefslogtreecommitdiffstats
path: root/netwerk/test/unit/test_offline_status.js
blob: 22fde0bd2087675d9a0c6f161e862f9d97a714d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"use strict";

function run_test() {
  try {
    var linkService = Cc[
      "@mozilla.org/network/network-link-service;1"
    ].getService(Ci.nsINetworkLinkService);

    // The offline status should depends on the link status
    Assert.notEqual(Services.io.offline, linkService.isLinkUp);
  } catch (e) {
    // The network link service might not be available
    Assert.equal(Services.io.offline, false);
  }
}