Bug 1042859 - Add test case for gcli cookie command on host:port. r=pbrosset

This commit is contained in:
Geoffroy Planquart 2015-03-13 09:06:00 -04:00
parent 78e3a5601a
commit d65a7915d7
2 changed files with 40 additions and 0 deletions

View File

@ -33,6 +33,7 @@ support-files =
[browser_cmd_cookie.js]
support-files =
browser_cmd_cookie.html
[browser_cmd_cookie_host.js]
[browser_cmd_csscoverage_oneshot.js]
support-files =
browser_cmd_csscoverage_page1.html

View File

@ -0,0 +1,39 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Tests that the cookie command works for host with a port specified
const TEST_URI = "http://mochi.test:8888/browser/browser/devtools/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/ ],
}
},
{
setup: "cookie set zup banana",
check: {
args: {
name: { value: 'zup' },
value: { value: 'banana' },
}
},
exec: {
output: ""
}
},
{
setup: "cookie list",
exec: {
output: [ /zap=zep/, /zip=zop/, /zup=banana/, /Edit/ ]
}
}
]);
}).then(finish, helpers.handleError);
}