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

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

Issue 2674863003: 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>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body> 3 <body>
7 <script src="script-tests/canvas-drawImage-incomplete.js"></script> 4 <script>
5 test(function(t) {
6 var canvas = document.createElement("canvas");
7 var ctx = canvas.getContext('2d');
8 ctx.fillStyle = 'red';
9 ctx.fillRect(0,0,150,150);
10
11 var img = new Image();
12 img.src = '../../http/tests/misc/resources/image-slow.pl';
13
14 var video = document.createElement("video");
15
16 assert_equals(ctx.drawImage(img, 0, 0), undefined);
17
18 var imgdata = ctx.getImageData(0, 0, 1, 1).data;
19 assert_equals(imgdata[0], 255);
20 assert_equals(imgdata[1], 0);
21 assert_equals(imgdata[2], 0);
22 assert_equals(imgdata[3], 255);
23
24 assert_equals(ctx.drawImage(video, 0, 0), undefined);
25
26 imgdata = ctx.getImageData(0, 0, 1, 1).data;
27 assert_equals(imgdata[0], 255);
28 assert_equals(imgdata[1], 0);
29 assert_equals(imgdata[2], 0);
30 assert_equals(imgdata[3], 255);
31 }, "Test that drawImage() does nothing with an incomplete image or video");
32 </script>
8 </body> 33 </body>
9 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698