Files
firefox/devtools/client/commandline/test/browser_cmd_cookie_host.js
T
Michael Ratcliffe 22786b7f52 Bug 1264993 - Unable to list/edit certain cookies in GCLI r=jwalker
Simple patch to correct errors in cookie host matching:
  1. Match domains starting with a . in case this style was used e.g. .test.example.com
  2. Match localhost URLS.

MozReview-Commit-ID: 9qqnsNaW5oK
2016-04-18 13:54:23 +01:00

42 lines
1.0 KiB
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Tests that the cookie command works for host with a port specified
const TEST_URI = "http://mochi.test:8888/browser/devtools/client/commandline/" +
"test/browser_cmd_cookie.html";
function test() {
helpers.addTabWithToolbar(TEST_URI, function(options) {
return helpers.audit(options, [
{
setup: 'cookie list',
exec: {
output: [ /zap=zep/, /zip=zop/, /zig=zag/ ],
}
},
{
setup: "cookie set zup banana",
check: {
args: {
name: { value: 'zup' },
value: { value: 'banana' },
}
},
exec: {
output: ""
}
},
{
setup: "cookie list",
exec: {
output: [ /zap=zep/, /zip=zop/, /zig=zag/, /zup=banana/, /Edit/ ]
}
}
]);
}).then(finish, helpers.handleError);
}