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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-strokeRect-zeroSizeGradient.html

Issue 2690183006: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Addressing comments Created 3 years, 10 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> 3 <script>
4 <script src="../../resources/js-test.js"></script> 4 test(function(t) {
5 </head> 5 var ctx = document.createElement('canvas').getContext('2d');
6 <body> 6
7 <script src="script-tests/canvas-strokeRect-zeroSizeGradient.js"></script> 7 ctx.fillStyle = '#0f0';
8 </body> 8 ctx.fillRect(0, 0, 1, 1);
9 </html> 9
10 var g = ctx.createLinearGradient(0, 0, 0, 0); // zero-length line (undefined direction);
11 g.addColorStop(0, '#f00');
12 g.addColorStop(1, '#f00');
13 ctx.strokeStyle = g;
14 ctx.strokeRect(0, 0, 1 , 1);
15
16 assert_array_equals(ctx.getImageData(0, 0, 1, 1).data.slice(0,3), [0, 255, 0 ]);
17 }, "Series of tests to ensure that strokeRect() paints nothing on canvas when th e strokeStyle is set to a zero-size gradient.");
18 </script>
19
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698