Update web-platform-tests to revision 548818eee08f7a6e31b9706b352b5d44b2f6d024

This commit is contained in:
WPT Sync Bot 2019-12-12 08:22:50 +00:00
parent 82fd8d1daf
commit 5e74467d68
112 changed files with 1704 additions and 536 deletions

View file

@ -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.
});