Closed Bug 2080474 Opened 1 month ago Closed 1 month ago

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

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

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

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

WebKit export from bug: Module script elements with an empty or invalid src fire the error event synchronously

<pre>
Module script elements with an empty or invalid src fire the error event synchronously

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

"Prepare the script element" [1] says:

 &quot;If src is the empty string, then queue an element task on the DOM
 manipulation task source given el to fire an event named error at el,
 and return.&quot;

 &quot;If url is failure, then queue an element task on the DOM manipulation
 task source given el to fire an event named error at el, and return.&quot;

These steps run before the switch on el's type, so they apply to classic
and module scripts alike.

requestClassicScript() already queues the task, but requestModuleScript()
called dispatchErrorEvent() directly, so for module scripts the error event
fired synchronously inside appendChild(). Use the same
queueTaskKeepingObjectAlive() pattern as the classic path.

[1] <a href="https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element">https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element</a>

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

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 514 tests and 3 subtests

Status Summary

Firefox

OK : 1[GitHub] 501[Gecko-android-em-14-x86_64-debug-geckoview] 502[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 506[Gecko-windows11-32-25h2-debug] 507[Gecko-windows11-64-25h2-debug] 508[Gecko-linux2404-64-debug] 510[Gecko-windows11-32-25h2-opt] 511[Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-opt]
PASS : 4[GitHub] 3206[Gecko-android-em-14-x86_64-debug-geckoview] 3210[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 3224[Gecko-windows11-32-25h2-debug] 3225[Gecko-windows11-64-25h2-debug] 3229[Gecko-linux2404-64-debug] 3246[Gecko-windows11-32-25h2-opt] 3247[Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-opt]
FAIL : 60[Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt] 76[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] 78[Gecko-linux2404-64-debug, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug]
ERROR: 3[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-linux2404-64-debug, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug] 4[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]

Chrome

OK : 1
PASS : 4

Safari

OK : 1
PASS : 2
FAIL : 2

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: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.