11cb0ef41Sopenharmony_citest(function() {
21cb0ef41Sopenharmony_ci    var params = new URLSearchParams('a=b&c=d');
31cb0ef41Sopenharmony_ci    assert_equals(params.get('a'), 'b');
41cb0ef41Sopenharmony_ci    assert_equals(params.get('c'), 'd');
51cb0ef41Sopenharmony_ci    assert_equals(params.get('e'), null);
61cb0ef41Sopenharmony_ci    params = new URLSearchParams('a=b&c=d&a=e');
71cb0ef41Sopenharmony_ci    assert_equals(params.get('a'), 'b');
81cb0ef41Sopenharmony_ci    params = new URLSearchParams('=b&c=d');
91cb0ef41Sopenharmony_ci    assert_equals(params.get(''), 'b');
101cb0ef41Sopenharmony_ci    params = new URLSearchParams('a=&c=d&a=e');
111cb0ef41Sopenharmony_ci    assert_equals(params.get('a'), '');
121cb0ef41Sopenharmony_ci}, 'Get basics');
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_citest(function() {
151cb0ef41Sopenharmony_ci    var params = new URLSearchParams('first=second&third&&');
161cb0ef41Sopenharmony_ci    assert_true(params != null, 'constructor returned non-null value.');
171cb0ef41Sopenharmony_ci    assert_true(params.has('first'), 'Search params object has name "first"');
181cb0ef41Sopenharmony_ci    assert_equals(params.get('first'), 'second', 'Search params object has name "first" with value "second"');
191cb0ef41Sopenharmony_ci    assert_equals(params.get('third'), '', 'Search params object has name "third" with the empty value.');
201cb0ef41Sopenharmony_ci    assert_equals(params.get('fourth'), null, 'Search params object has no "fourth" name and value.');
211cb0ef41Sopenharmony_ci}, 'More get() basics');
22