Closed Bug 2085381 Opened 1 month ago Closed 27 days ago

[wpt-sync] Sync PR 63989 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=320579

Categories

(Core :: DOM: Networking, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63989 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63989
Details from upstream follow.

Ahmad Saleem <ahmad.saleem792+github@gmail.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=320579

WebKit export from bug: [<!---->XHR]<!----> Final response charset is recomputed for every received data chunk

<pre>
[XHR] Final response charset is recomputed for every received data chunk

didReceiveData() resolved the final response charset into m_responseEncoding on
every chunk, costing a media type parse and a String allocation per network
callback. It was only read by finalResponseCharset() feeding createDecoder(),
which runs once per load, and neither input can change in between:
overrideMimeType() and the responseType setter throw once the state reaches
LOADING.

Resolve the charset directly from the two inputs in finalResponseCharset(), per
<<a href="https://xhr.spec.whatwg.org/#final-charset">https://xhr.spec.whatwg.org/#final-charset</a>>, and remove m_responseEncoding.
This also drops a second extractCharsetFromMediaType() call that could never
match, since its input was that same parser's output. No behavior change.

Add coverage for a charset spanning chunk boundaries; the existing
overrideMimeType() tests all use single-chunk responses.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=320579">https://bugs.webkit.org/show_bug.cgi?id=320579</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/318297@main">https://commits.webkit.org/318297@main</a>
</pre>

Component: web-platform-tests → DOM: Networking
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 438 tests and 1 subtests

Status Summary

Firefox

OK : 1[GitHub] 434[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-windows11-64-25h2-debug] 435[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt] 436[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 437[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
PASS: 4[GitHub] 2275[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-windows11-64-25h2-debug] 2278[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt] 2279[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 2280[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL: 36

Chrome

OK : 1
PASS: 4

Safari

OK : 1
PASS: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /xhr/open-url-multi-window-4.htm [wpt.fyi]: SKIP
  • /xhr/send-response-event-order.htm [wpt.fyi]: OK [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt], SKIP [Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
  • /xhr/send-response-upload-event-progress.htm [wpt.fyi]: OK [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt], SKIP [Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
  • /xhr/access-control-preflight-credential-async.htm [wpt.fyi]
    • CORS async request with URL credentials: FAIL
  • /xhr/access-control-preflight-credential-sync.htm [wpt.fyi]
    • CORS sync request with URL credentials: FAIL
  • /xhr/event-timeout.any.worker.html [wpt.fyi]: OK [Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
  • /xhr/getallresponseheaders-after-reuse.html [wpt.fyi]
    • getAllResponseHeaders() must not return the previous response's headers: FAIL
  • /xhr/getallresponseheaders.htm [wpt.fyi]
    • XMLHttpRequest: getAllResponseHeaders() 2: FAIL
    • XMLHttpRequest: getAllResponseHeaders() 3: FAIL
    • XMLHttpRequest: getAllResponseHeaders() 5: FAIL
    • XMLHttpRequest: getAllResponseHeaders() 6: FAIL
  • /xhr/getresponseheader.any.html [wpt.fyi]
    • getResponseHeader('content-length') expects 0, 0: FAIL
    • getResponseHeader('double-trouble') expects , : FAIL
    • getResponseHeader('heya') expects , , 1, , , 2: FAIL
    • getResponseHeader('www-authenticate') expects 1, 2, 3, 4: FAIL
  • /xhr/getresponseheader.any.worker.html [wpt.fyi]
    • getResponseHeader('content-length') expects 0, 0: FAIL
    • getResponseHeader('double-trouble') expects , : FAIL
    • getResponseHeader('heya') expects , , 1, , , 2: FAIL
    • getResponseHeader('www-authenticate') expects 1, 2, 3, 4: FAIL
  • /xhr/open-url-multi-window-6.htm [wpt.fyi]
    • XMLHttpRequest: open() in document that is not fully active (but may be active) should throw: FAIL
  • /xhr/overridemimetype-blob.html [wpt.fyi]
      1. MIME types need to be parsed and serialized: TEXT/HTML;CHARSET=GBK: FAIL
      1. MIME types need to be parsed and serialized: text/html;charset= ";charset=GBK: FAIL
      1. MIME types need to be parsed and serialized: text/html;charset=";charset=foo";charset=GBK: FAIL
      1. MIME types need to be parsed and serialized: text/html;charset=";charset=GBK: FAIL
      1. MIME types need to be parsed and serialized: !#$%&'+-.^_|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/!#$%&'*+-.^_|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz;!#$%&'+-.^_|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=!#$%&'*+-.^_|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz: FAIL
      1. MIME types need to be parsed and serialized: x/x;x=" !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ": FAIL`
      1. MIME types need to be parsed and serialized: text/html;test=ÿ;charset=gbk: FAIL
  • /xhr/responseurl-after-abort.any.worker.html [wpt.fyi]
    • abort() during HEADERS_RECEIVED clears responseURL: FAIL
    • abort() during LOADING clears responseURL: FAIL
    • abort() during DONE clears responseURL (async): FAIL
    • abort() during DONE clears responseURL (sync): FAIL
    • responseURL reflects the new response after abort() and reuse: FAIL
  • /xhr/responseurl-after-abort.any.html [wpt.fyi]
    • abort() during HEADERS_RECEIVED clears responseURL: FAIL
    • abort() during LOADING clears responseURL: FAIL
  • /xhr/send-usp.any.worker.html [wpt.fyi]
    • XMLHttpRequest.send(URLSearchParams): POST uses the URLSearchParams MIME type when no Content-Type was set: FAIL
    • XMLHttpRequest.send(URLSearchParams): POST replaces the charset parameter of an author-set Content-Type: FAIL
  • /xhr/sync-xhr-and-window-onload.html [wpt.fyi]: OK [Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], SKIP [Gecko-android-em-14-x86_64-debug-geckoview]
  • /xhr/sync-xhr-supported-by-permissions-policy.tentative.html [wpt.fyi]
    • document.permissionsPolicy.features should advertise sync-xhr.: FAIL
  • /xhr/xhr-authorization-redirect.any.html [wpt.fyi]: OK [Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-windows11-64-25h2-debug]
  • /xhr/xhr-timeout-longtask.any.html [wpt.fyi]
    • Long tasks should not trigger load timeout: FAIL
  • /xhr/xmlhttprequest-sync-default-permissions-policy.tentative.sub.html [wpt.fyi]
    • permissions policy "sync-xhr" can be disabled in cross-origin iframes using "allow" attribute.: FAIL
    • permissions policy "sync-xhr" can be disabled in same-origin iframes using "allow" attribute.: FAIL

Tests Disabled in Gecko Infrastructure

  • /xhr/open-url-multi-window-4.htm [wpt.fyi]: SKIP linked bug:Bug 1366966
  • /xhr/send-response-event-order.htm [wpt.fyi]: OK [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt], SKIP [Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
  • /xhr/send-response-upload-event-progress.htm [wpt.fyi]: OK [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt], SKIP [Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
  • /xhr/event-timeout.any.worker.html [wpt.fyi]: OK [Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
  • /xhr/sync-xhr-and-window-onload.html [wpt.fyi]: OK [Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], SKIP [Gecko-android-em-14-x86_64-debug-geckoview]
  • /xhr/xhr-authorization-redirect.any.html [wpt.fyi]: OK [Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-windows11-64-25h2-debug]
Status: NEW → RESOLVED
Closed: 27 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.