Closed Bug 2080526 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63506 - [WPT] Fix img-sizes-auto test to use attribute selector

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 63506 into mozilla-central (this bug is closed when the sync is complete).

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

John Jansen <johnjansen@microsoft.com> wrote:

[WPT] Fix img-sizes-auto test to use attribute selector

The test's "!important" subtest compares a real \<img sizes=auto
class=test-important> element against a synthetic "expected" clone
created via createElementNS() in a non-HTML namespace.

The test's author rule img.test-important { contain-intrinsic-size: 30px 15px } was meant to apply to that expected clone so the ref's
computed style reflects the author-overridden value. Due to a Chromium
bug (https://issues.chromium.org/issues/41276987), the class selector
fails to match elements created in a non-HTML namespace, so the rule
never applied to the expected clone and the subtest compared against the
wrong reference value.

Switch to the equivalent attribute selector
img[class~="test-important"], which is not affected by this bug and
matches the expected clone correctly, so the subtest asserts against the
correct reference value.

Bug: 571158508
Test: Ran run_web_tests.py for img-sizes-auto.html; manually verified all 24 subtests pass in Firefox.
Change-Id: Ia7a8d8fbff0a4515ec99370a4fa933f90a00b7ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8539079
Commit-Queue: John Jansen \<johnjansen@microsoft.com>
Reviewed-by: Mike Jackson \<mjackson@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1715829}

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

CI Results

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

Total 1 tests and 24 subtests

Status Summary

Firefox

OK : 1
PASS: 24

Chrome

OK : 1
PASS: 24

Safari

OK : 1
PASS: 24

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2ea2a80034be https://hg.mozilla.org/integration/autoland/rev/e2a1a39b729d [wpt PR 63506] - [WPT] Fix img-sizes-auto test to use attribute selector, a=testonly
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.