Closed Bug 1839595 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 40666 - [css-fonts] Update expected error in @font-face format test

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Dominik Röttsches <drott@chromium.org> wrote:

[css-fonts] Update expected error in @font-face format test

From https://drafts.csswg.org/css-font-loading/#font-face-constructor:
"If the source argument is a CSSOMString, parse it according to the
grammar of the CSS src descriptor of the @font-face rule. If any of
them fail to parse correctly, reject font face’s [[FontStatusPromise]]
with a DOMException named "SyntaxError""

From https://www.w3.org/TR/css-fonts-4/#font-face-src-parsing
"If there are no supported entries at the end of this process, the
value for the src descriptor is a parse error.

This means, incorrect values for format (as the test generates them in the cases where expectFail = true) should be rejected early in parsing and be reported as a rejected promise of DOMException type Syntax error, not network error.

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6aef67bd1922 [wpt PR 40666] - [css-fonts] Update expected error in @font-face format test, a=testonly https://hg.mozilla.org/integration/autoland/rev/af9969d86f13 [wpt PR 40666] - Update wpt metadata, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.