Skip to content

Commit

Permalink
Merge 332384c into 38f4c68
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu authored Jul 1, 2017
2 parents 38f4c68 + 332384c commit da797a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions url/urlsearchparams-delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
params.delete('first');
assert_false(params.has('first'), 'Search params object has no "first" name');
}, 'Deleting appended multiple');

test(function() {
var url = new URL('http://example.com/?param1&param2');
url.searchParams.delete('param1');
url.searchParams.delete('param2');
assert_equals(url.href, 'http://example.com/?', 'url.href has ?');
assert_equals(url.search, '', 'url.search does not have ?');
}, 'Deleting all params keeps ? in URL');
</script>
</head>
</html>

0 comments on commit da797a5

Please sign in to comment.