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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-drawImage-incomplete.js

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
(Empty)
1 description("Test that drawImage() does nothing with an incomplete image or vide o");
2
3 if (window.testRunner)
4 testRunner.dumpAsText();
5
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 shouldBe("ctx.drawImage(img, 0, 0)", "undefined");
17
18 var imgdata = ctx.getImageData(0, 0, 1, 1).data;
19 shouldBe("imgdata[0]", "255");
20 shouldBe("imgdata[1]", "0");
21 shouldBe("imgdata[2]", "0");
22 shouldBe("imgdata[3]", "255");
23
24 shouldBe("ctx.drawImage(video, 0, 0)", "undefined");
25
26 imgdata = ctx.getImageData(0, 0, 1, 1).data;
27 shouldBe("imgdata[0]", "255");
28 shouldBe("imgdata[1]", "0");
29 shouldBe("imgdata[2]", "0");
30 shouldBe("imgdata[3]", "255");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698