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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-2d-imageData-create-nonfinite.html

Issue 2671853004: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Corrections 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> 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>
7 <canvas id="canvas" width=600 height=300> 3 <canvas id="canvas" width=600 height=300>
8 <script src="resources/canvas-2d-imageData-create-nonfinite.js"></script> 4 <script>
9 </body> 5 test(function(t) {
6 var canvas = document.getElementById('canvas');
7 var ctx = canvas.getContext('2d');
8
9 assert_throws(null, function() {ctx.createImageData(Infinity, Infinity);}, " Failed to execute 'createImageData' on 'CanvasRenderingContext2D': The provided double value is non-finite..");
10 assert_throws(null, function() {ctx.createImageData(Infinity, 10);}, "Failed to execute 'createImageData' on 'CanvasRenderingContext2D': The provided double value is non-finite..");
11 assert_throws(null, function() {ctx.createImageData(-Infinity, 10);}, "Faile d to execute 'createImageData' on 'CanvasRenderingContext2D': The provided doubl e value is non-finite..");
12 assert_throws(null, function() {ctx.createImageData(10, Infinity);}, "Failed to execute 'createImageData' on 'CanvasRenderingContext2D': The provided double value is non-finite..");
13 assert_throws(null, function() {ctx.createImageData(10, -Infinity);}, "Faile d to execute 'createImageData' on 'CanvasRenderingContext2D': The provided doubl e value is non-finite..");
14 assert_throws(null, function() {ctx.createImageData(NaN, 10);}, "Failed to e xecute 'createImageData' on 'CanvasRenderingContext2D': The provided double valu e is non-finite..");
15 assert_throws(null, function() {ctx.createImageData(10, NaN);}, "Failed to e xecute 'createImageData' on 'CanvasRenderingContext2D': The provided double valu e is non-finite..");
16 }, 'Test the argument bounds of canvas createImageData.');
17 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698