OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <meta charset="utf-8"> |
| 3 <link rel="help" href="http://url.spec.whatwg.org/#dom-urlquery-getall"> |
| 4 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> |
| 6 <script> |
| 7 |
| 8 test(function() { |
| 9 var q = new URLQuery('a=b&c=d'); |
| 10 assert_array_equals(q.getAll('a'), ['b']); |
| 11 assert_array_equals(q.getAll('c'), ['d']); |
| 12 assert_array_equals(q.getAll('e'), []); |
| 13 |
| 14 q = new URLQuery('a=b&c=d&a=e'); |
| 15 assert_array_equals(q.getAll('a'), ['b', 'e']); |
| 16 |
| 17 q = new URLQuery('=b&c=d'); |
| 18 assert_array_equals(q.getAll(''), ['b']); |
| 19 |
| 20 q = new URLQuery('a=&c=d&a=e'); |
| 21 assert_array_equals(q.getAll('a'), ['', 'e']); |
| 22 }, 'Get all basics'); |
| 23 |
| 24 </script> |
OLD | NEW |