Closed Bug 2089331 Opened 13 days ago Closed 5 days ago

[wpt-sync] Sync PR 64121 - script: Use create_a_potential_cors_request_with_claim in htmlmediaelement.rs

Categories

(Core :: DOM: Core & HTML, 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 64121 into mozilla-central (this bug is closed when the sync is complete).

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

rogerkorantenng <rogerkorantenng@gmail.com> wrote:

script: Use create_a_potential_cors_request_with_claim in htmlmediaelement.rs

Use ensure_blob_referenced_by_url_is_kept_alive to get a UrlWithBlobClaim for the media element's resource URL in fetch_request, then pass it to create_a_potential_cors_request_with_claim instead of the temporary create_a_potential_cors_request.

Testing: Added tests/wpt/tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/media-blob-url-revoked.window.js. It loads an <audio> from a blob URL and has three subtests: the URL is never revoked, it is revoked in a microtask after the fetch has started (both should load), and it is revoked before src is set (should fire error with MEDIA_ERR_SRC_NOT_SUPPORTED). All three pass with the fix. They also passed without it in 15 of 15 local runs, because the request reaches the net thread before the revoke does, so this test is regression coverage rather than proof of the fix. ./mach test-tidy is clean. Try run: https://github.com/rogerkorantenng/servo/actions/runs/39981862598

Note: seeks and resumed downloads call fetch_request again and take a new claim, so if the page revokes the URL after the first load, those refetches will still fail. Happy to handle that in a follow-up if wanted.

Fixes: Part of #<!-- nolink -->48892
Reviewed in servo/servo#49206

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 51 tests and 1 subtests

Status Summary

Firefox

OK : 1[GitHub] 45[Gecko-android-em-14-x86_64-debug-geckoview] 50[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug] 51[Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-opt]
PASS: 2[GitHub] 35[Gecko-android-em-14-x86_64-debug-geckoview] 38[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 41[Gecko-windows11-32-25h2-opt] 42[Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-opt] 44[Gecko-linux2404-64-debug, Gecko-windows11-64-25h2-debug]
FAIL: 1[GitHub] 15[Gecko-android-em-14-x86_64-debug-geckoview] 16[Gecko-linux2404-64-debug, Gecko-windows11-64-25h2-debug] 18[Gecko-windows11-32-25h2-debug] 19[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 2
FAIL: 1

Safari

OK : 1
PASS: 2
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.