forked from kdashg/gecko-cinn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1867517 [wpt PR 41817] - HTML: test UA styles for <img sizes=auto…
…>, a=testonly Automatic update from web-platform-tests HTML: test UA styles for <img sizes=auto> See whatwg/html#9493 -- wpt-commits: 0f673999acbd28c5584e03f61da96a30e38ac092 wpt-pr: 41817
- Loading branch information
1 parent
9a6699c
commit 1bd2b66
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
testing/web-platform/tests/html/rendering/replaced-elements/images/img-sizes-auto.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!doctype html> | ||
<title>default styles for <img sizes=auto></title> | ||
<meta name="viewport" content="width=device-width"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/rendering/support/test-ua-stylesheet.js"></script> | ||
<style> | ||
/* Specify this bogus namespace, so the rules in this stylesheet only apply to the `fakeClone`d elements in #refs, not the HTML elements in #tests. */ | ||
@namespace url(urn:not-html); | ||
|
||
img:is([sizes="auto" i], [sizes^="auto," i]) { | ||
contain: size !important; | ||
contain-intrinsic-size: 300px 150px; | ||
} | ||
</style> | ||
|
||
<style> | ||
/* Test !important */ | ||
img.test-important { contain: style; contain-intrinsic-size: 30px 15px; } | ||
</style> | ||
|
||
<div id="log"></div> | ||
|
||
<div id="tests"> | ||
<img sizes=auto> | ||
<img sizes=auto width=10 height=20> | ||
<img sizes=AuTo> | ||
<img sizes=auto,xyz> | ||
<img sizes=AuTo,xyz> | ||
|
||
<!-- UA style should not apply: --> | ||
<img> | ||
<img sizes> | ||
<img sizes=xyz,auto> | ||
<picture data-skip> | ||
<source data-skip sizes=auto> | ||
<img> | ||
</picture> | ||
|
||
<!-- Test !important --> | ||
<img sizes=auto class=test-important> | ||
</div> | ||
|
||
<div id="refs"></div> | ||
|
||
<script> | ||
const props = [ | ||
'contain', | ||
'contain-intrinsic-size' | ||
]; | ||
runUAStyleTests(props); | ||
|
||
</script> |