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

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

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
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-overloads-fillText.js"></script> 4 <script>
5 var ctx = document.createElement('canvas').getContext('2d');
6
7 function ExpectedNotEnoughArgumentsMessage(num) {
8 return "\"TypeError: Failed to execute 'fillText' on 'CanvasRenderingContext 2D': 3 arguments required, but only " + num + " present.\"";
9 }
10
11 test(function(t) {
12 assert_throws(null, function() {ctx.fillText();}, ExpectedNotEnoughArguments Message(0));
13 assert_throws(null, function() {ctx.fillText('moo');}, ExpectedNotEnoughArgu mentsMessage(1));
14 assert_throws(null, function() {ctx.fillText('moo',0);}, ExpectedNotEnoughAr gumentsMessage(2));
15 assert_equals(ctx.fillText('moo',0,0), undefined);
16 assert_equals(ctx.fillText('moo',0,0,0), undefined);
17 assert_equals(ctx.fillText('moo',0,0,0,0), undefined);
18 }, "Test the behavior of CanvasRenderingContext2D.fillText() when called with di fferent numbers of arguments.");
19 </script>
8 </body> 20 </body>
9 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698