blob: be82e1987405e8aef57b5265d14d8fb64d52c5a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
img {
width: 200px;
height: 200px;
}
</style>
<img id="image" src="resources/test-load.jpg" width="100" height="100">
<script>
description("Should used styled image dimensions if available.");
var image = document.getElementById("image");
shouldBe("image.width", "200");
shouldBe("image.height", "200");
var rect = image.getBoundingClientRect();
shouldBe("rect.width", "200");
shouldBe("rect.height", "200");
</script>
|