29 lines
894 B
HTML
29 lines
894 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<script>
|
|
jsTestIsAsync = true;
|
|
description("Test for WK112651: SVG image container size should not survive reloads.");
|
|
|
|
function runTest() {
|
|
var image1 = document.getElementById('image1');
|
|
image1.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><rect width='100%' height='100%' fill='green'/></svg>";
|
|
image1.onload = function() {
|
|
image1.setAttribute('width', image1.width + 50);
|
|
var image2 = document.getElementById('image2');
|
|
image2.src = image1.src;
|
|
image2.onload = function() {
|
|
shouldBe("image2.width", "100");
|
|
finishJSTest();
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="runTest()">
|
|
<img id="image1"><img id="image2">
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|