зеркало из https://github.com/mozilla/pjs.git
Add a test for URI construction and query modification. r=philiKON
This commit is contained in:
Родитель
80df913945
Коммит
b9947162bf
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче