1if (self.location) { 2 test(function() { 3 assert_false("searchParams" in self.location, 4 "location object should not have a searchParams attribute"); 5 }, "searchParams on location object"); 6} 7 8if(self.GLOBAL.isWindow()) { 9 test(() => { 10 assert_false("searchParams" in document.createElement("a")) 11 assert_false("searchParams" in document.createElement("area")) 12 }, "<a> and <area>.searchParams should be undefined"); 13} 14 15test(function() { 16 var url = new URL("./foo", "http://www.example.org"); 17 assert_equals(url.href, "http://www.example.org/foo"); 18 assert_throws(new TypeError(), function() { 19 url.href = "./bar"; 20 }); 21}, "Setting URL's href attribute and base URLs"); 22 23test(function() { 24 assert_equals(URL.domainToASCII, undefined); 25}, "URL.domainToASCII should be undefined"); 26 27test(function() { 28 assert_equals(URL.domainToUnicode, undefined); 29}, "URL.domainToUnicode should be undefined"); 30 31done(); 32