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

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

Issue 2694703004: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: 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 the behavior of CanvasRenderingContext2D.drawImage() when call ed with different numbers of arguments.");
2
3 var ctx = document.createElement('canvas').getContext('2d');
4
5 var imageElement = document.createElement("img");
6 shouldThrow("ctx.drawImage()");
7 shouldThrow("ctx.drawImage(imageElement)");
8 shouldThrow("ctx.drawImage(imageElement, 0)");
9 shouldBe("ctx.drawImage(imageElement, 0, 0)", "undefined");
10 shouldThrow("ctx.drawImage(imageElement, 0, 0, 0)");
11 shouldBe("ctx.drawImage(imageElement, 0, 0, 0, 0)", "undefined");
12 shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0)");
13 shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0)");
14 shouldThrow("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0)");
15 shouldBe("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0)", "undefined");
16 shouldBe("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "undefined");
17 shouldBe("ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "undefined ");
18
19 var canvasElement = document.createElement("canvas");
20 shouldThrow("ctx.drawImage(canvasElement)");
21 shouldThrow("ctx.drawImage(canvasElement, 0)");
22 shouldBe("ctx.drawImage(canvasElement, 0, 0)", "undefined");
23 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0)");
24 shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0)", "undefined");
25 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0)");
26 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0)");
27 shouldThrow("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0)");
28 shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0)", "undefined");
29 shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "undefined") ;
30 shouldBe("ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "undefine d");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698