summaryrefslogtreecommitdiffstats
path: root/netwerk/test/unit/test_cache2-00-service-get.js
blob: 7286041111c46e9f2016aca6788d0acb9122ad58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"use strict";

function run_test() {
  // Just check the contract ID alias works well.
  try {
    var serviceA = Cc[
      "@mozilla.org/netwerk/cache-storage-service;1"
    ].getService(Ci.nsICacheStorageService);
    Assert.ok(serviceA);
    var serviceB = Cc[
      "@mozilla.org/network/cache-storage-service;1"
    ].getService(Ci.nsICacheStorageService);
    Assert.ok(serviceB);

    Assert.equal(serviceA, serviceB);
  } catch (ex) {
    do_throw("Cannot instantiate cache storage service: " + ex);
  }
}