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

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

Issue 2693193003: 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-shadow.js"></script> 4 <script>
5 var ctx = document.createElement('canvas').getContext('2d');
6
7 function checkPixel(x, y, rgb) {
8 assert_array_equals(ctx.getImageData(x, y, 1, 1).data.slice(0,3), rgb);
9 }
10
11 test(function(t) {
12
13 ctx.fillStyle = "green";
14 ctx.fillRect(0, 0, 100, 100);
15 ctx.shadowColor = "green";
16 ctx.shadowOffsetX = 0;
17 ctx.shadowOffsetY = 0;
18 ctx.shadowBlur = 0;
19 checkPixel(1, 0, [0, 128, 0]);
20
21 ctx.clearRect(0, 0, 200, 50);
22 ctx.shadowColor = "green";
23 ctx.shadowOffsetX = 100;
24 ctx.shadowOffsetY = 0;
25 ctx.shadowBlur = 2;
26 ctx.fillStyle = "green";
27 ctx.fillRect(0, 0, 100, 50);
28 checkPixel(111, 10, [0, 128, 0]);
29
30 }, "Some tests for Canvas shadows");
31 </script>
8 </body> 32 </body>
9 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698