mirror of
https://github.com/servo/servo.git
synced 2025-07-16 03:43:38 +01:00
This fixes an intermittent failure introduced in <https://github.com/servo/servo/pull/3929>.
33 lines
588 B
HTML
33 lines
588 B
HTML
<html>
|
|
<head>
|
|
<title></title>
|
|
<script src="harness.js"></script>
|
|
</head>
|
|
<body>
|
|
<img src="test.png"/>
|
|
<script>
|
|
// Testing get/set of image width/height properties
|
|
waitForExplicitFinish();
|
|
|
|
var img = window.document.getElementsByTagName("img")[0];
|
|
|
|
function wait_for_img_load(f) {
|
|
if (img.width != 0) {
|
|
f();
|
|
} else {
|
|
window.setTimeout(function() { wait_for_img_load(f) }, 1);
|
|
}
|
|
}
|
|
|
|
wait_for_img_load(function() {
|
|
is(img.width, 500);
|
|
is(img.height, 378);
|
|
img.width = 200;
|
|
img.height = 100;
|
|
is(img.width, 200);
|
|
is(img.height, 100);
|
|
finish();
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|