Merge split script tests
https://bugs.webkit.org/show_bug.cgi?id=172423

Reviewed by Sam Weinig.

In the past, many tests were being split into HTML and JS parts for no good reason.
This makes it hard to see what those tests are doing.

This is first part of the change, only including files where JS and HTML counterparts
have matching names. Custom cases will be completed in a follow-up.

Long change list omitted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html b/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html
index 21259fc..00b2c05 100644
--- a/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html
+++ b/LayoutTests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html
@@ -9,6 +9,129 @@
 <h1>SVG 1.1 dynamic update tests</h1>
 <p id="description"></p>
 <div id="console"></div>
-<script src="script-tests/SVGFECompositeElement-dom-k1-attr.js"></script>
+<script>
+// [Name] SVGFECompositeElement-dom-k1-attr.js
+// [Expected rendering result] Four circle with different opacity merged with feComposite filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'k1' attribute of the SVGFECompositeElement object")
+createSVGTestCase();
+
+var defsElement = createSVGElement("defs");
+rootSVGElement.appendChild(defsElement);
+
+var off1 = createSVGElement("feOffset");
+off1.setAttribute("dx", "35");
+off1.setAttribute("dy", "25");
+off1.setAttribute("result", "off1");
+
+var flood1 = createSVGElement("feFlood");
+flood1.setAttribute("flood-color", "#408067");
+flood1.setAttribute("flood-opacity", ".8");
+flood1.setAttribute("result", "F1");
+
+var overComposite1 = createSVGElement("feComposite");
+overComposite1.setAttribute("in", "F1");
+overComposite1.setAttribute("in2", "off1");
+overComposite1.setAttribute("operator", "arithmetic");
+overComposite1.setAttribute("k1", "1.9");
+overComposite1.setAttribute("k2", ".1");
+overComposite1.setAttribute("k3", ".5");
+overComposite1.setAttribute("k4", ".3");
+overComposite1.setAttribute("result", "C1");
+
+var off2 = createSVGElement("feOffset");
+off2.setAttribute("in", "SourceGraphic");
+off2.setAttribute("dx", "60");
+off2.setAttribute("dy", "50");
+off2.setAttribute("result", "off2");
+
+var flood2 = createSVGElement("feFlood");
+flood2.setAttribute("flood-color", "#408067");
+flood2.setAttribute("flood-opacity", ".6");
+flood2.setAttribute("result", "F2");
+
+var overComposite2 = createSVGElement("feComposite");
+overComposite2.setAttribute("in", "F2");
+overComposite2.setAttribute("in2", "off2");
+overComposite2.setAttribute("operator", "in");
+overComposite2.setAttribute("result", "C2");
+
+var off3 = createSVGElement("feOffset");
+off3.setAttribute("in", "SourceGraphic");
+off3.setAttribute("dx", "85");
+off3.setAttribute("dy", "75");
+off3.setAttribute("result", "off3");
+
+var flood3 = createSVGElement("feFlood");
+flood3.setAttribute("flood-color", "#408067");
+flood3.setAttribute("flood-opacity", ".4");
+flood3.setAttribute("result", "F3");
+
+var overComposite3 = createSVGElement("feComposite");
+overComposite3.setAttribute("in2", "off3");
+overComposite3.setAttribute("operator", "in");
+overComposite3.setAttribute("result", "C3");
+
+var merge = createSVGElement("feMerge");
+
+var mergeNode1 = createSVGElement("feMergeNode");
+mergeNode1.setAttribute("in", "C1");
+
+var mergeNode2 = createSVGElement("feMergeNode");
+mergeNode2.setAttribute("in", "C2");
+
+var mergeNode3 = createSVGElement("feMergeNode");
+mergeNode3.setAttribute("in", "C3");
+
+var mergeNode4 = createSVGElement("feMergeNode");
+mergeNode4.setAttribute("in", "SourceGraphic");
+
+merge.appendChild(mergeNode3);
+merge.appendChild(mergeNode2);
+merge.appendChild(mergeNode1);
+merge.appendChild(mergeNode4);
+
+var overFilter = createSVGElement("filter");
+overFilter.setAttribute("id", "overFilter");
+overFilter.setAttribute("filterUnits", "objectBoundingBox");
+overFilter.setAttribute("x", "0");
+overFilter.setAttribute("y", "0");
+overFilter.setAttribute("width", "3.5");
+overFilter.setAttribute("height", "4");
+overFilter.appendChild(off1);
+overFilter.appendChild(flood1);
+overFilter.appendChild(overComposite1);
+overFilter.appendChild(off2);
+overFilter.appendChild(flood2);
+overFilter.appendChild(overComposite2);
+overFilter.appendChild(off3);
+overFilter.appendChild(flood3);
+overFilter.appendChild(overComposite3);
+overFilter.appendChild(merge);
+
+defsElement.appendChild(overFilter);
+
+rootSVGElement.setAttribute("height", "200");
+
+var rect1 = createSVGElement("circle");
+rect1.setAttribute("cx", "100");
+rect1.setAttribute("cy", "50");
+rect1.setAttribute("r", "50");
+rect1.setAttribute("fill", "#408067");
+rect1.setAttribute("filter", "url(#overFilter)");
+
+rootSVGElement.appendChild(rect1);
+
+shouldBeEqualToString("overComposite1.getAttribute('k1')", "1.9");
+
+function repaintTest() {
+    overComposite1.setAttribute("k1", ".5");
+    shouldBeEqualToString("overComposite1.getAttribute('k1')", ".5");
+
+    completeTest();
+}
+
+var successfullyParsed = true;
+</script>
 </body>
 </html>