| Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-bezier-same-endpoint.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-bezier-same-endpoint.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-bezier-same-endpoint.html
|
| index d64da818cd1f7a844599087393a9eaa29d7127ad..fcbcf8e6e3cb1f8eb7ccb8cc73119113e63949aa 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-bezier-same-endpoint.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-bezier-same-endpoint.html
|
| @@ -1,55 +1,49 @@
|
| -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
| -<html>
|
| -<head>
|
| -<script src="../../resources/js-test.js"></script>
|
| -</head>
|
| -<body>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| <canvas id="canvas" width="100" height="100"></canvas>
|
| -<script>
|
| -description("Bug 105650: Test correct rendering of quadratic and bezier curves with coincident endpoints");
|
| -var ctx = document.getElementById('canvas').getContext('2d');
|
| -var data;
|
| -
|
| -function shouldBeYellow(x,y)
|
| -{
|
| - blue_value = ctx.getImageData(x, y, 1, 1).data[2];
|
| - shouldBe("blue_value", "0");
|
| -}
|
| -
|
| -function shouldBeBlue(x,y)
|
| -{
|
| - blue_value = ctx.getImageData(x, y, 1, 1).data[2];
|
| - shouldBe("blue_value", "255");
|
| -}
|
| -
|
| -ctx.fillStyle = '#00f';
|
| -ctx.strokeStyle = '#ff0';
|
| -ctx.lineWidth = 30;
|
| -
|
| -ctx.beginPath();
|
| -ctx.fillRect(0,0,100,100);
|
| -ctx.moveTo(0,0);
|
| -
|
| -// bezier curve with coincident endpoints, horizontal line
|
| -ctx.bezierCurveTo(0,0,200,0,0,0);
|
| -shouldBeBlue(50,0);
|
| -ctx.stroke();
|
| -shouldBeYellow(50,0);
|
| -shouldBeBlue(0,50);
|
| -shouldBeBlue(70,70);
|
| -
|
| -// bezier curve with coincident endpoints, vertical line
|
| -ctx.bezierCurveTo(0,200,0,0,0,0);
|
| -ctx.stroke();
|
| -shouldBeYellow(50,0);
|
| -shouldBeBlue(75,75);
|
| -
|
| -// bezier curve with coincident endpoints
|
| -ctx.bezierCurveTo(200,0,0,200,0,0);
|
| -ctx.stroke();
|
| -shouldBeYellow(75,75);
|
| -
|
|
|
| +<script>
|
| +test(function(t) {
|
| + var ctx = document.getElementById('canvas').getContext('2d');
|
| + var data;
|
| +
|
| + function shouldBeYellow(x,y)
|
| + {
|
| + blue_value = ctx.getImageData(x, y, 1, 1).data[2];
|
| + assert_equals(blue_value, 0);
|
| + }
|
| +
|
| + function shouldBeBlue(x,y)
|
| + {
|
| + blue_value = ctx.getImageData(x, y, 1, 1).data[2];
|
| + assert_equals(blue_value, 255);
|
| + }
|
| +
|
| + ctx.fillStyle = '#00f';
|
| + ctx.strokeStyle = '#ff0';
|
| + ctx.lineWidth = 30;
|
| +
|
| + ctx.beginPath();
|
| + ctx.fillRect(0,0,100,100);
|
| + ctx.moveTo(0,0);
|
| +
|
| + // bezier curve with coincident endpoints, horizontal line
|
| + ctx.bezierCurveTo(0,0,200,0,0,0);
|
| + shouldBeBlue(50,0);
|
| + ctx.stroke();
|
| + shouldBeYellow(50,0);
|
| + shouldBeBlue(0,50);
|
| + shouldBeBlue(70,70);
|
| +
|
| + // bezier curve with coincident endpoints, vertical line
|
| + ctx.bezierCurveTo(0,200,0,0,0,0);
|
| + ctx.stroke();
|
| + shouldBeYellow(50,0);
|
| + shouldBeBlue(75,75);
|
| +
|
| + // bezier curve with coincident endpoints
|
| + ctx.bezierCurveTo(200,0,0,200,0,0);
|
| + ctx.stroke();
|
| + shouldBeYellow(75,75);
|
| +}, 'Test correct rendering of quadratic and bezier curves with coincident endpoints (bug 105650)');
|
| </script>
|
| -</body>
|
| -</html>
|
|
|