Handle url parse errors in Location#assign more gracefully.

This commit is contained in:
Ms2ger 2015-08-07 15:47:55 +02:00
parent da88e9ad9f
commit 7e179d9245
2 changed files with 9 additions and 4 deletions

View file

@ -15,6 +15,12 @@
assert_equals((href + "#x"), location.href, "location href");
}, "location assign");
test(function () {
var href = location.href;
location.assign("http://:");
assert_equals(location.href, href);
}, "URL that fails to parse");
</script>
</body>
</html>