Only test expected origin when it is present

https://github.com/w3c/web-platform-tests/pull/2584
This commit is contained in:
Simon Sapin 2016-04-22 14:33:15 +02:00
parent eee317352c
commit 7375e2cedd
3 changed files with 6 additions and 74 deletions

View file

@ -38,7 +38,9 @@ function runURLTests(urltests) {
}
assert_equals(url.href, expected.href, "href")
assert_equals(url.origin, expected.origin, "origin")
if ("origin" in expected) {
assert_equals(url.origin, expected.origin, "origin")
}
assert_equals(url.protocol, expected.protocol, "protocol")
assert_equals(url.username, expected.username, "username")
assert_equals(url.password, expected.password, "password")