Index: third_party/WebKit/LayoutTests/svg/transforms/svgdom-manipulation-before-attach.html |
diff --git a/third_party/WebKit/LayoutTests/svg/transforms/svgdom-manipulation-before-attach.html b/third_party/WebKit/LayoutTests/svg/transforms/svgdom-manipulation-before-attach.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..500442ecc0e99c2b219896614b79341f50027606 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/svg/transforms/svgdom-manipulation-before-attach.html |
@@ -0,0 +1,15 @@ |
+<!DOCTYPE html> |
+<svg></svg> |
+<script> |
+var svg = document.querySelector("svg"); |
+var g = document.createElementNS('http://www.w3.org/2000/svg', 'g'); |
+var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); |
+var attrs = { x: 100, y:100, width: 100, height: 100, fill: 'green' }; |
+for (var k in attrs) |
+ rect.setAttribute(k, attrs[k]); |
+ |
+var matrix = svg.createSVGMatrix().translate(-100, -100); |
+g.transform.baseVal.appendItem(svg.createSVGTransformFromMatrix(matrix)); |
+ |
+svg.appendChild(g).appendChild(rect); |
+</script> |