Closed
Bug 1377772
Opened 8 years ago
Closed 8 years ago
searchParams on new URL() is empty
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: rtm, Assigned: baku)
Details
Attachments
(1 file)
1.85 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170628075643
Steps to reproduce:
const url = new URL('http://foo.bar?q=1');
console.log(url.searchParams.get('q'));
Actual results:
Reports null. `searchParams` is apparently empty.
Expected results:
`searchParams` should contain an entry for `q`, and `searchParams.get('q')` should return 1.
Comment 1•8 years ago
|
||
I cannot reproduce the issue.
Component: Untriaged → DOM
Product: Firefox → Core
Sorry, please try with 'mailto:rtm@gol.com?subject=Hi`.
`new URL('mailto:rtm@gol.com?subject=Hi').searchParams.get('subject')` returns `null`.
One would expect it to return `"Hi"`.
I am not able to parse the spec to determine whether this is supposed to work, but it does work in Chrome.
Updated•8 years ago
|
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 3•8 years ago
|
||
Initially GetQuery() was not part of nsIURI but only nsIURL.
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attachment #8883163 -
Flags: review?(bugs)
Comment 4•8 years ago
|
||
Comment on attachment 8883163 [details] [diff] [review]
url_searchParams.patch
Huh, there aren't any wpt tests for this?
Attachment #8883163 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/44e7349a4cbb
URL.searchParams should exist also when nsSimpleURI is used, r=smaug
Assignee | ||
Comment 6•8 years ago
|
||
WPT added in the patch before landing it.
![]() |
||
Comment 7•8 years ago
|
||
Backed out for failing wpt /url/a-element-xhtml.xhtml:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ff3bdce13ad38f4eb371bd00364be36648a106c
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=44e7349a4cbbe98ab39e1d97aa5ff7bc608d6ea6&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=111892459&repo=mozilla-inbound
[task 2017-07-05T09:05:15.867591Z] 09:05:15 INFO - TEST-FAIL | /url/a-element-xhtml.xhtml | Parsing: <blob:d3958f5c-0777-0845-9dcf-2cb28783acaf> against <about:blank> - assert_equals: pathname expected "d3958f5c-0777-0845-9dcf-2cb28783acaf" but got ""
[task 2017-07-05T09:05:15.867964Z] 09:05:15 INFO - runURLTests/<@http://web-platform.test:8000/url/a-element.js:47:7
[task 2017-07-05T09:05:15.868314Z] 09:05:15 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1405:20
[task 2017-07-05T09:05:15.868677Z] 09:05:15 INFO - test@http://web-platform.test:8000/resources/testharness.js:497:9
[task 2017-07-05T09:05:15.869025Z] 09:05:15 INFO - runURLTests@http://web-platform.test:8000/url/a-element.js:30:5
[task 2017-07-05T09:05:15.869386Z] 09:05:15 INFO - request.onload<@http://web-platform.test:8000/url/a-element.js:8:5
[task 2017-07-05T09:05:15.869753Z] 09:05:15 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1405:20
[task 2017-07-05T09:05:15.870117Z] 09:05:15 INFO - Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1429:20
[task 2017-07-05T09:05:15.870486Z] 09:05:15 INFO - EventHandlerNonNull*@http://web-platform.test:8000/url/a-element.js:7:20
[task 2017-07-05T09:05:15.870860Z] 09:05:15 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1405:20
[task 2017-07-05T09:05:15.871215Z] 09:05:15 INFO - @http://web-platform.test:8000/url/a-element.js:2:1
[task 2017-07-05T09:05:15.871602Z] 09:05:15 INFO - TEST-UNEXPECTED-FAIL | /url/a-element-xhtml.xhtml | Parsing: <mailto:a@b.com?subject=Hi> against <about:blank> - assert_equals: pathname expected "a@b.com" but got ""
[task 2017-07-05T09:05:15.871958Z] 09:05:15 INFO - runURLTests/<@http://web-platform.test:8000/url/a-element.js:47:7
[task 2017-07-05T09:05:15.872324Z] 09:05:15 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1405:20
[task 2017-07-05T09:05:15.872683Z] 09:05:15 INFO - test@http://web-platform.test:8000/resources/testharness.js:497:9
[task 2017-07-05T09:05:15.873033Z] 09:05:15 INFO - runURLTests@http://web-platform.test:8000/url/a-element.js:30:5
[task 2017-07-05T09:05:15.873401Z] 09:05:15 INFO - request.onload<@http://web-platform.test:8000/url/a-element.js:8:5
[task 2017-07-05T09:05:15.873897Z] 09:05:15 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1405:20
[task 2017-07-05T09:05:15.874260Z] 09:05:15 INFO - Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1429:20
[task 2017-07-05T09:05:15.874628Z] 09:05:15 INFO - EventHandlerNonNull*@http://web-platform.test:8000/url/a-element.js:7:20
[task 2017-07-05T09:05:15.875051Z] 09:05:15 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1405:20
[task 2017-07-05T09:05:15.875413Z] 09:05:15 INFO - @http://web-platform.test:8000/url/a-element.js:2:1
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c93deefbf398
URL.searchParams should exist also when nsSimpleURI is used, r=smaug
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(amarchesini)
Comment 9•8 years ago
|
||
bugherder |
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•