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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-getImageData-invalid.html

Issue 2771933002: Update createImageData/getImageData/putImageData from float to long (Closed)
Patch Set: Reset tests Created 3 years, 8 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 <script src="../../resources/testharness.js"></script> 1 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script> 2 <script src="../../resources/testharnessreport.js"></script>
3 <body> 3 <body>
4 <script> 4 <script>
5 test(function(t) { 5 test(function(t) {
6 ctx = document.createElement('canvas').getContext('2d'); 6 ctx = document.createElement('canvas').getContext('2d');
7 7
8 assert_throws(null, function() {ctx.getImageData(NaN, 10, 10, 10)});
9 assert_throws(null, function() {ctx.getImageData(10, NaN, 10, 10)});
10 assert_throws(null, function() {ctx.getImageData(10, 10, NaN, 10)});
11 assert_throws(null, function() {ctx.getImageData(10, 10, 10, NaN)});
12 assert_throws(null, function() {ctx.getImageData(Infinity, 10, 10, 10)});
13 assert_throws(null, function() {ctx.getImageData(10, Infinity, 10, 10)});
14 assert_throws(null, function() {ctx.getImageData(10, 10, Infinity, 10)});
15 assert_throws(null, function() {ctx.getImageData(10, 10, 10, Infinity)});
16 assert_throws(null, function() {ctx.getImageData(undefined, 10, 10, 10)});
17 assert_throws(null, function() {ctx.getImageData(10, undefined, 10, 10)});
18 assert_throws(null, function() {ctx.getImageData(10, 10, undefined, 10)});
19 assert_throws(null, function() {ctx.getImageData(10, 10, 10, undefined)});
20 assert_throws(null, function() {ctx.getImageData(10, 10, 0, 10)}); 8 assert_throws(null, function() {ctx.getImageData(10, 10, 0, 10)});
21 assert_throws(null, function() {ctx.getImageData(10, 10, 10, 0)}); 9 assert_throws(null, function() {ctx.getImageData(10, 10, 10, 0)});
22 }, "Test the handling of invalid arguments in canvas getImageData()."); 10 }, "Test the handling of invalid arguments in canvas getImageData().");
23 </script> 11 </script>
24 </body> 12 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698