| Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-path-constructors.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-constructors.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-constructors.html
|
| index d70f6b88b7f57199f017dfd33649b74ce1f67136..d6eae78431a5db5eaaf61b2434d605043d6dc091 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-constructors.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-path-constructors.html
|
| @@ -1,9 +1,30 @@
|
| -<!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>
|
| -<script src="script-tests/canvas-path-constructors.js"></script>
|
| +<script>
|
| +test(function(t) {
|
| + var ctx = document.createElement('canvas').getContext('2d');
|
| +
|
| + ctx.beginPath();
|
| + var p1 = new Path2D();
|
| + p1.rect(0,0,100,100);
|
| + ctx.fillStyle = 'yellow';
|
| + ctx.fill(p1);
|
| + assert_array_equals(ctx.getImageData(1, 0, 1, 1).data, [255, 255, 0, 255]);
|
| +
|
| + ctx.beginPath();
|
| + var p2 = new Path2D("M100,0L200,0L200,100L100,100z");
|
| + ctx.fillStyle = 'blue';
|
| + ctx.fill(p2);
|
| + assert_array_equals(ctx.getImageData(101, 0, 1, 1).data, [0, 0, 255, 255]);
|
| +
|
| + ctx.beginPath();
|
| + var p3 = new Path2D(p1);
|
| + ctx.translate(200,0);
|
| + ctx.fillStyle = 'green';
|
| + ctx.fill(p3);
|
| + ctx.translate(-200,0);
|
| + assert_array_equals(ctx.getImageData(201, 0, 1, 1).data, [0, 128, 0, 255]);
|
| +}, "Test different constructors of Path.");
|
| +</script>
|
| </body>
|
| -</html>
|
|
|