Lines Matching refs:expected
15 for (const expected of urlTests) {
17 if (typeof expected === "string")
21 if (expected.relativeTo === "any-base")
25 const base = expected.base === null ? "about:blank" : expected.base;
27 function getKey(expected) {
28 if (expected.protocol) {
29 return expected.protocol.replace(":", "");
31 if (expected.failure) {
32 return expected.input.split(":")[0];
37 subsetTestByKey(getKey(expected), test, function() {
38 var url = bURL(expected.input, base)
39 if(expected.failure) {
43 assert_equals(url.href, expected.input, "failure should set href to input")
47 assert_equals(url.href, expected.href, "href")
48 assert_equals(url.protocol, expected.protocol, "protocol")
49 assert_equals(url.username, expected.username, "username")
50 assert_equals(url.password, expected.password, "password")
51 assert_equals(url.host, expected.host, "host")
52 assert_equals(url.hostname, expected.hostname, "hostname")
53 assert_equals(url.port, expected.port, "port")
54 assert_equals(url.pathname, expected.pathname, "pathname")
55 assert_equals(url.search, expected.search, "search")
56 assert_equals(url.hash, expected.hash, "hash")
57 }, "Parsing: <" + expected.input + "> against <" + base + ">")