mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[test] Test case for URLSearchParams
This commit is contained in:
parent
0a7895e362
commit
6e2e6b0976
10
test/ecmascript/assert/URLSearchParams.html
Normal file
10
test/ecmascript/assert/URLSearchParams.html
Normal file
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
console.error("URLSearchParams.html");
|
||||
var param = new URLSearchParams('?foo=1&bar=2');
|
||||
console.assert(param.size === 2, 'size is 2');
|
||||
console.assert(param.has('foo'), 'foo');
|
||||
console.assert(param.has('bar', '2'), 'bar=2');
|
||||
console.assert(param.get('bar') === '2', 'bar = 2');
|
||||
console.assert(param.toString() === 'foo=1&bar=2', 'without ?');
|
||||
console.exit();
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user