mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add a test for URI construction and query modification. r=philiKON
This commit is contained in:
parent
8181b80bb2
commit
b4ced7b0da
@ -485,5 +485,18 @@ function run_test() {
|
||||
}
|
||||
do_check_eq(error.result, Cr.NS_ERROR_NET_TIMEOUT);
|
||||
|
||||
_("Testing URI construction.");
|
||||
let args = [];
|
||||
args.push("newer=" + 1234);
|
||||
args.push("limit=" + 1234);
|
||||
args.push("sort=" + 1234);
|
||||
|
||||
let query = "?" + args.join("&");
|
||||
|
||||
let uri1 = Utils.makeURL("http://foo/" + query);
|
||||
let uri2 = Utils.makeURL("http://foo/");
|
||||
uri2.query = query;
|
||||
do_check_eq(uri1.query, uri2.query);
|
||||
|
||||
server.stop(do_test_finished);
|
||||
}
|
||||
|
@ -683,6 +683,22 @@ function run_test() {
|
||||
next();
|
||||
}));
|
||||
|
||||
}, function (next) {
|
||||
|
||||
_("Testing URI construction.");
|
||||
let args = [];
|
||||
args.push("newer=" + 1234);
|
||||
args.push("limit=" + 1234);
|
||||
args.push("sort=" + 1234);
|
||||
|
||||
let query = "?" + args.join("&");
|
||||
|
||||
let uri1 = Utils.makeURL("http://foo/" + query);
|
||||
let uri2 = Utils.makeURL("http://foo/");
|
||||
uri2.query = query;
|
||||
do_check_eq(uri1.query, uri2.query);
|
||||
next();
|
||||
|
||||
}, function (next) {
|
||||
|
||||
// Don't quit test harness before server shuts down.
|
||||
|
Loading…
Reference in New Issue
Block a user