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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/linearGradient-infinite-values.html

Issue 2703803002: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Addressing comments Created 3 years, 9 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> 3
4 <script src="../../resources/js-test.js"></script> 4 <script>
5 </head> 5 // This test checks createLinearGradient with infinite values
6 <body> 6 var ctx = document.createElement('canvas').getContext('2d');
7 <script src="script-tests/linearGradient-infinite-values.js"></script> 7
8 </body> 8 function testCreateLinearGradient(params)
9 </html> 9 {
10 x0 = params[0]; y0 = params[1]; x1 = params[2]; y1 = params[3];
11 assert_throws(null, function(){ctx.createLinearGradient(x0, y0, x1, y1);});
12 }
13
14 var testScenarios = [
15 ['Test createLinearGradient(0, 0, 100, NaN)' , [0, 0, 100, NaN]],
16 ['Test createLinearGradient(0, 0, 100, Infinity)' , [0, 0, 100, Infinity]],
17 ['Test createLinearGradient(0, 0, 100, -Infinity)' , [0, 0, 100, -Infinity]] ,
18 ['Test createLinearGradient(0, 0, NaN, 100)' , [0, 0, NaN, 100]],
19 ['Test createLinearGradient(0, 0, Infinity, 100)' , [0, 0, Infinity, 100]],
20 ['Test createLinearGradient(0, 0, -Infinity, 100)' , [0, 0, -Infinity, 100]] ,
21 ['Test createLinearGradient(0, NaN, 100, 100)' , [0, NaN, 100, 100]],
22 ['Test createLinearGradient(0, Infinity, 100, 100)' , [0, Infinity, 100, 100 ]],
23 ['Test createLinearGradient(0, -Infinity, 100, 100)' , [0, -Infinity, 100, 1 00]],
24 ['Test createLinearGradient(NaN, 0, 100, 100)' , [NaN, 0, 100, 100]],
25 ['Test createLinearGradient(Infinity, 0, 100, 100)' , [Infinity, 0, 100, 100 ]],
26 ['Test createLinearGradient(-Infinity, 0, 100, 100)' , [-Infinity, 0, 100, 1 00]],
27 ];
28
29 generate_tests(testCreateLinearGradient, testScenarios);
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698