4 let SSService = Cc["@mozilla.org/ssservice;1"].getService(
5 Ci.nsISiteSecurityService
7 let uri = Services.io.newURI("https://includesubdomains.preloaded.test");
9 // check that a host on the preload list is identified as an sts host
10 ok(SSService.isSecureURI(uri));
12 // now simulate that it's 19 weeks later than it actually is
13 let offsetSeconds = 19 * 7 * 24 * 60 * 60;
14 Services.prefs.setIntPref("test.currentTimeOffsetSeconds", offsetSeconds);
16 // check that the preloaded host is no longer considered sts
17 ok(!SSService.isSecureURI(uri));
19 // just make sure we can get everything back to normal
20 Services.prefs.clearUserPref("test.currentTimeOffsetSeconds");
21 ok(SSService.isSecureURI(uri));