Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-strokeText-strokes-shadow.html

Issue 2690183006: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Addressing comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <script src="../../resources/testharness.js"></script>
2 <html> 2 <script src="../../resources/testharnessreport.js"></script>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body> 3 <body>
7 <script src="script-tests/canvas-strokeText-strokes-shadow.js"></script> 4 <script>
5 test(function(t) {
6 var ctx = document.createElement('canvas').getContext('2d');
7
8 ctx.fillStyle = 'green';
9 ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
10
11 // Stroke an 'I' with its shadow in the upper left corner.
12 ctx.strokeStyle = 'white';
13 ctx.lineWidth = 2;
14 ctx.shadowColor = 'red';
15 ctx.shadowOffsetX = -15;
16 ctx.shadowOffsetY = 0;
17 ctx.font = '128px sans-serif';
18 ctx.strokeText("I", 0, 50);
19
20 assert_array_equals(ctx.getImageData(0, 0, 1, 1).data, [0, 128, 0, 255]);
21 }, "Test that strokeText() doesn't produce a filled shadow.");
22 </script>
8 </body> 23 </body>
9 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698