| Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-strokeText-zeroSizeGradient.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-strokeText-zeroSizeGradient.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-strokeText-zeroSizeGradient.html
|
| index 0dff8ad4e6207f8012546a97a15a6ff35956f684..01e20eea8aaa993e25d6879b33edff5c9f4d41a6 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-strokeText-zeroSizeGradient.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-strokeText-zeroSizeGradient.html
|
| @@ -1,9 +1,21 @@
|
| -<!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-strokeText-zeroSizeGradient.js"></script>
|
| +<script>
|
| +test(function(t) {
|
| + var ctx = document.createElement('canvas').getContext('2d');
|
| +
|
| + ctx.fillStyle = '#0f0';
|
| + ctx.fillRect(0, 0, 1, 1);
|
| +
|
| + var g = ctx.createLinearGradient(0, 0, 0, 0); // zero-length line (undefined direction);
|
| + g.addColorStop(0, '#f00');
|
| + g.addColorStop(1, '#f00');
|
| + ctx.strokeStyle = g;
|
| + ctx.font = '1px sans-serif';
|
| + ctx.strokeText("AA", 0, 1);
|
| +
|
| + assert_array_equals(ctx.getImageData(0, 0, 1, 1).data.slice(0,3), [0, 255, 0]);
|
| +}, "Series of tests to ensure that strokeText() paints nothing on canvas when the strokeStyle is set to a zero-size gradient.");
|
| +</script>
|
| </body>
|
| -</html>
|
|
|