diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /netwerk/test/unit/test_bug667818.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'netwerk/test/unit/test_bug667818.js')
-rw-r--r-- | netwerk/test/unit/test_bug667818.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/netwerk/test/unit/test_bug667818.js b/netwerk/test/unit/test_bug667818.js new file mode 100644 index 000000000..e730e74c1 --- /dev/null +++ b/netwerk/test/unit/test_bug667818.js @@ -0,0 +1,21 @@ +Cu.import("resource://gre/modules/Services.jsm"); + +function makeURI(str) { + return Components.classes["@mozilla.org/network/io-service;1"] + .getService(Components.interfaces.nsIIOService) + .newURI(str, null, null); +} + +function run_test() { + // Allow all cookies. + Services.prefs.setIntPref("network.cookie.cookieBehavior", 0); + var serv = Components.classes["@mozilla.org/cookieService;1"] + .getService(Components.interfaces.nsICookieService); + var uri = makeURI("http://example.com/"); + // Try an expiration time before the epoch + serv.setCookieString(uri, null, "test=test; path=/; domain=example.com; expires=Sun, 31-Dec-1899 16:00:00 GMT;", null); + do_check_eq(serv.getCookieString(uri, null), null); + // Now sanity check + serv.setCookieString(uri, null, "test2=test2; path=/; domain=example.com;", null); + do_check_eq(serv.getCookieString(uri, null), "test2=test2"); +} |