mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
Bug 650522 - Test handling of host names with a single character before a dot correctly; r=dwitte
This commit is contained in:
parent
d9ed139208
commit
580d4bd109
16
extensions/cookie/test/unit/test_bug650522.js
Normal file
16
extensions/cookie/test/unit/test_bug650522.js
Normal file
@ -0,0 +1,16 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
Components.utils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
function run_test() {
|
||||
var cs = Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService);
|
||||
var cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2);
|
||||
var expiry = (Date.now() + 1000) * 1000;
|
||||
|
||||
// Test our handling of host names with a single character at the beginning
|
||||
// followed by a dot.
|
||||
cm.add("e.mail.com", "/", "foo", "bar", false, false, true, expiry);
|
||||
do_check_eq(cm.countCookiesFromHost("e.mail.com"), 1);
|
||||
do_check_eq(cs.getCookieString(NetUtil.newURI("http://e.mail.com"), null), "foo=bar");
|
||||
}
|
@ -4,6 +4,7 @@ tail =
|
||||
|
||||
[test_bug468700.js]
|
||||
[test_bug526789.js]
|
||||
[test_bug650522.js]
|
||||
[test_cookies_async_failure.js]
|
||||
[test_cookies_persistence.js]
|
||||
[test_cookies_privatebrowsing.js]
|
||||
|
Loading…
Reference in New Issue
Block a user