Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-quadratic-same-endpoint.html |
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-quadratic-same-endpoint.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-quadratic-same-endpoint.html |
index a6becb96f3730739388cd5114f563f5e53ecc004..5147b9abefcbc9cb1f480ef3610ac80fe09c4aa7 100644 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-quadratic-same-endpoint.html |
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-quadratic-same-endpoint.html |
@@ -1,44 +1,40 @@ |
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
-<html> |
-<head> |
-<script src="../../resources/js-test.js"></script> |
-</head> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
<body> |
<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) |
+function shouldBeYellow(x, y) |
{ |
- blue_value = ctx.getImageData(x, y, 1, 1).data[2]; |
- shouldBe("blue_value", "0"); |
+ blue_value = ctx.getImageData(x, y, 1, 1).data[2]; |
+ assert_equals(blue_value, 0); |
} |
-function shouldBeBlue(x,y) |
+function shouldBeBlue(x, y) |
{ |
- blue_value = ctx.getImageData(x, y, 1, 1).data[2]; |
- shouldBe("blue_value", "255"); |
+ 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); |
- |
-// quadratic with coincident endpoint |
-ctx.moveTo(20,20); |
- |
-//Next line should be close to ctx.bezierCurveTo(81,80,80,80,20,20); |
-ctx.quadraticCurveTo(110,110,20,20); |
- |
-shouldBeBlue(70,70); |
-ctx.stroke(); |
-shouldBeYellow(70,70); |
+test(function(t) { |
+ ctx.fillStyle = '#00f'; |
+ ctx.strokeStyle = '#ff0'; |
+ ctx.lineWidth = 30; |
+ |
+ ctx.beginPath(); |
+ ctx.fillRect(0, 0, 100, 100); |
+ |
+ // quadratic with coincident endpoint |
+ ctx.moveTo(20, 20); |
+ |
+ //Next line should be close to ctx.bezierCurveTo(81, 80, 80, 80, 20, 20); |
+ ctx.quadraticCurveTo(110, 110, 20, 20); |
+ |
+ shouldBeBlue(70, 70); |
+ ctx.stroke(); |
+ shouldBeYellow(70, 70); |
+}, "Bug 105650: Test correct rendering of quadratic and bezier curves with coincident endpoints"); |
</script> |
</body> |
-</html> |