Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Issue 46913002: Have XHR.getResponseHeader() return null in initial ready states. (Closed)

Created:
7 years, 1 month ago by sof
Modified:
7 years, 1 month ago
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Have XHR.getResponseHeader() return null in initial ready states. Follow the XMLHttpRequest specification for getResponseHeader() and return null if the object is in ready states {UNSENT, OPENED}. Similarly for getAllResponseHeaders() and returning "" (the empty string) when in these initial two ready states. This replaces the older spec behavior of throwing InvalidStateError, something that no other engines currently do, hence cross-browser compatibility risk is low. When reconciling the relevant tests, reworked these to use js-test-{pre,post}.js instead. R=tyoshino@chromium.org BUG=311274 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=160679

Patch Set 1 #

Total comments: 13

Patch Set 2 : Improve test code quality in places #

Total comments: 2

Patch Set 3 : Test code consistency #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -256 lines) Patch
M LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html View 1 2 1 chunk +48 lines, -97 lines 0 comments Download
M LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders-expected.txt View 1 2 1 chunk +24 lines, -7 lines 0 comments Download
M LayoutTests/http/tests/xmlhttprequest/getResponseHeader.html View 1 2 1 chunk +47 lines, -118 lines 0 comments Download
M LayoutTests/http/tests/xmlhttprequest/getResponseHeader-expected.txt View 1 1 chunk +52 lines, -28 lines 0 comments Download
M Source/core/xml/XMLHttpRequest.cpp View 2 chunks +2 lines, -6 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
sof
please have a look (or suggest someone else that might want to :) )
7 years, 1 month ago (2013-10-26 17:55:37 UTC) #1
tyoshino (SeeGerritForStatus)
thanks https://codereview.chromium.org/46913002/diff/1/LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html File LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html (right): https://codereview.chromium.org/46913002/diff/1/LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html#newcode38 LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html:38: else { join l37 and l38 please https://codereview.chromium.org/46913002/diff/1/LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html#newcode48 ...
7 years, 1 month ago (2013-10-26 19:05:13 UTC) #2
sof
https://codereview.chromium.org/46913002/diff/1/LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html File LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html (right): https://codereview.chromium.org/46913002/diff/1/LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html#newcode48 LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html:48: shouldBeGreaterThanOrEqual("XMLHttpRequest.OPENED", "xhr.readyState"); On 2013/10/26 19:05:13, tyoshino wrote: > seems ...
7 years, 1 month ago (2013-10-26 20:02:26 UTC) #3
tyoshino (SeeGerritForStatus)
lgtm Needs core/ OWNER's approval. Please wait for abarth's review. https://codereview.chromium.org/46913002/diff/1/LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html File LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html (right): https://codereview.chromium.org/46913002/diff/1/LayoutTests/http/tests/xmlhttprequest/getAllResponseHeaders.html#newcode48 ...
7 years, 1 month ago (2013-10-26 20:22:46 UTC) #4
sof
On 2013/10/26 20:22:46, tyoshino wrote: > lgtm > > Needs core/ OWNER's approval. Please wait ...
7 years, 1 month ago (2013-10-26 20:57:57 UTC) #5
abarth-chromium
lgtm
7 years, 1 month ago (2013-10-26 23:08:19 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/46913002/180001
7 years, 1 month ago (2013-10-26 23:08:26 UTC) #7
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=14160
7 years, 1 month ago (2013-10-26 23:47:21 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/46913002/180001
7 years, 1 month ago (2013-10-27 02:57:57 UTC) #9
commit-bot: I haz the power
7 years, 1 month ago (2013-10-27 15:04:21 UTC) #10
Message was sent while issue was closed.
Change committed as 160679

Powered by Google App Engine
This is Rietveld 408576698