Index: LayoutTests/svg/custom/use-dynamic-attribute-setting.html |
diff --git a/LayoutTests/svg/custom/use-dynamic-attribute-setting.html b/LayoutTests/svg/custom/use-dynamic-attribute-setting.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7ca222cc0fc5e4698ff2228ac5157d39ab9ff6c5 |
--- /dev/null |
+++ b/LayoutTests/svg/custom/use-dynamic-attribute-setting.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE HTML> |
+<html> |
+<body> |
+This test passes if there are two green squares below:<br> |
+<svg width="300" height="300"> |
+ <defs> |
+ <svg id="svg" width="10" height="10"> |
+ <rect width="100%" height="100%" fill="green"/> |
+ </svg> |
+ </defs> |
+ <use id="use1" xlink:href="#svg" x="0" y="0" width="100" height="100"/> |
+ <use id="use2" xlink:href="#svg" x="100" y="100" width="10" height="10"/> |
+</svg> |
+<script> |
+ onload = function() { |
+ // Wait until first layout is finished. |
+ window.requestAnimationFrame(function() { |
+ document.getElementById('use2').setAttribute('width', '100'); |
+ document.getElementById('use2').setAttribute('height', '100'); |
+ }); |
+ } |
+</script> |
+</body> |
+</html> |