mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 548818eee08f7a6e31b9706b352b5d44b2f6d024
This commit is contained in:
parent
82fd8d1daf
commit
5e74467d68
112 changed files with 1704 additions and 536 deletions
|
@ -11,6 +11,7 @@
|
|||
</style>
|
||||
<img src="/images/green.png">
|
||||
<img src="/images/green.png" width=100 height=125>
|
||||
<img src="" width=100 height=125>
|
||||
<script>
|
||||
let t = async_test("Image width and height attributes are used to infer aspect-ratio");
|
||||
function assert_ratio(img, expected) {
|
||||
|
@ -46,7 +47,8 @@ t.step(function() {
|
|||
|
||||
onload = t.step_func_done(function() {
|
||||
let images = document.querySelectorAll("img");
|
||||
assert_ratio(images[2], 1.266); // 1.266 is the original aspect ratio of blue.png
|
||||
assert_ratio(images[3], 1.266); // 1.266 is the original aspect ratio of blue.png
|
||||
assert_equals(getComputedStyle(images[2]).height, "0px"); // aspect-ratio doesn't override intrinsic size of images that don't have any src.
|
||||
assert_ratio(images[1], 2.0); // 2.0 is the original aspect ratio of green.png
|
||||
assert_ratio(images[0], 2.0); // Loaded image's aspect ratio, at least by default, overrides width / height ratio.
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue