mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 17:37:30 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
21
netwerk/test/unit/test_bug667818.js
Normal file
21
netwerk/test/unit/test_bug667818.js
Normal file
|
|
@ -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");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue