Index: LayoutTests/svg/custom/svg-image-container-size.html |
diff --git a/LayoutTests/svg/custom/svg-image-container-size.html b/LayoutTests/svg/custom/svg-image-container-size.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..193b520cdb08b97fb38ede33dd3a3622dd8c1372 |
--- /dev/null |
+++ b/LayoutTests/svg/custom/svg-image-container-size.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE html> |
+<script src=../../resources/run-after-display.js></script> |
+<script> |
+if (window.testRunner) |
+ testRunner.waitUntilDone(); |
+ |
+function insertSVGImage() { |
+ var image = document.createElementNS('http://www.w3.org/2000/svg', 'image'); |
+ image.setAttribute('width', 192); |
+ image.setAttribute('height', 64); |
+ image.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', 'resources/rgb.svg'); |
+ image.onload = function() { |
+ runAfterDisplay(function() { |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ }); |
+ }; |
+ document.querySelector('g').appendChild(image); |
+} |
+ |
+function startTest() { |
+ if (window.testRunner) |
+ testRunner.displayAsyncThen(insertSVGImage); |
+ else |
+ requestAnimationFrame(insertSVGImage); |
+} |
+</script> |
+<svg width="384" height="128" style="display: block"> |
+ <g transform="scale(2)"></g> |
+</svg> |
+<div> |
+ <img src="resources/rgb.svg" onload="startTest()" style="width: 384px; height: 128px;"> |
+</div> |