Bug 1516321 [wpt PR 14666] - Remove leading question mark when constructing URLSearchParams, a=testonly
authorCYBAI <cyb.ai.815@gmail.com>
Thu, 31 Jan 2019 15:16:10 +0000
changeset 457666 a2001fb06319b66b2726ea04efec4be5c1edfb1a
parent 457665 a8332ece191f7975a0bd0acad15fb5fbe222a5b6
child 457667 6ad0e50b0fc9e97a77e88b420c3f94a90a1cf5b4
push id111763
push userjames@hoppipolla.co.uk
push dateThu, 07 Feb 2019 22:12:57 +0000
treeherdermozilla-inbound@c983e907bbfd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1516321, 14666
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1516321 [wpt PR 14666] - Remove leading question mark when constructing URLSearchParams, a=testonly Automatic update from web-platform-tests Remove leading question mark when constructing URLSearchParams -- wpt-commits: a1cd313702011d10db825aec3219b32f8b65a944 wpt-pr: 14666
testing/web-platform/tests/url/urlsearchparams-constructor.any.js
--- a/testing/web-platform/tests/url/urlsearchparams-constructor.any.js
+++ b/testing/web-platform/tests/url/urlsearchparams-constructor.any.js
@@ -9,16 +9,21 @@ test(function() {
     assert_equals(params + '', 'a=b');
 }, 'Basic URLSearchParams construction');
 
 test(function() {
     var params = new URLSearchParams()
     assert_equals(params.toString(), "")
 }, "URLSearchParams constructor, no arguments")
 
+test(function () {
+    var params = new URLSearchParams("?a=b")
+    assert_equals(params.toString(), "a=b")
+}, 'URLSearchParams constructor, remove leading "?"')
+
 test(() => {
     var params = new URLSearchParams(DOMException);
     assert_equals(params.toString(), "INDEX_SIZE_ERR=1&DOMSTRING_SIZE_ERR=2&HIERARCHY_REQUEST_ERR=3&WRONG_DOCUMENT_ERR=4&INVALID_CHARACTER_ERR=5&NO_DATA_ALLOWED_ERR=6&NO_MODIFICATION_ALLOWED_ERR=7&NOT_FOUND_ERR=8&NOT_SUPPORTED_ERR=9&INUSE_ATTRIBUTE_ERR=10&INVALID_STATE_ERR=11&SYNTAX_ERR=12&INVALID_MODIFICATION_ERR=13&NAMESPACE_ERR=14&INVALID_ACCESS_ERR=15&VALIDATION_ERR=16&TYPE_MISMATCH_ERR=17&SECURITY_ERR=18&NETWORK_ERR=19&ABORT_ERR=20&URL_MISMATCH_ERR=21&QUOTA_EXCEEDED_ERR=22&TIMEOUT_ERR=23&INVALID_NODE_TYPE_ERR=24&DATA_CLONE_ERR=25")
     assert_throws(new TypeError(), () => new URLSearchParams(DOMException.prototype),
                   "Constructing a URLSearchParams from DOMException.prototype should throw due to branding checks");
 }, "URLSearchParams constructor, DOMException as argument")
 
 test(() => {