Skip to content

Commit

Permalink
Handle url parse errors in Location#assign more gracefully.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Aug 11, 2015
1 parent 842dad6 commit 377162e
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -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>

0 comments on commit 377162e

Please sign in to comment.