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/fast/canvas/canvas-gradient-without-path.html b/LayoutTests/fast/canvas/canvas-gradient-without-path.html
index b102e0f..288d14f 100644
--- a/LayoutTests/fast/canvas/canvas-gradient-without-path.html
+++ b/LayoutTests/fast/canvas/canvas-gradient-without-path.html
@@ -4,7 +4,39 @@
 <script src="../../resources/js-test-pre.js"></script>
 </head>
 <body>
-<script src="script-tests/canvas-gradient-without-path.js"></script>
+<script>
+description("Series of tests to ensure that no gradient is drawn without path");
+var ctx = document.createElement('canvas').getContext('2d');
+
+ctx.fillStyle = 'green';
+ctx.fillRect(0, 0, 100, 100);
+
+var gradient = ctx.createLinearGradient(0, 0, 0, 100);
+gradient.addColorStop(1, 'red');
+ctx.fillStyle = gradient;
+
+ctx.fill();
+
+var imageData = ctx.getImageData(1, 1, 98, 98);
+var imgdata = imageData.data;
+shouldBe("imgdata[4]", "0");
+shouldBe("imgdata[5]", "128");
+shouldBe("imgdata[6]", "0");
+
+ctx.strokeStyle = 'green';
+ctx.lineWidth = 100;
+ctx.strokeRect(50, 0, 100, 100);
+
+ctx.strokeStyle = gradient;
+
+ctx.stroke();
+
+imageData = ctx.getImageData(1, 1, 98, 98);
+imgdata = imageData.data;
+shouldBe("imgdata[4]", "0");
+shouldBe("imgdata[5]", "128");
+shouldBe("imgdata[6]", "0");
+</script>
 <script src="../../resources/js-test-post.js"></script>
 </body>
 </html>