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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges.html

Issue 2433363003: Updated fast/canvas/webgl-array-invalid-ranges.html (Closed)
Patch Set: Created 4 years, 2 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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 <script src="resources/webgl-test.js"></script> 4 <script src="resources/webgl-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <div id="description"></div> 7 <div id="description"></div>
8 <div id="console"></div> 8 <div id="console"></div>
9 9
10 <script> 10 <script>
11 11
12 description("Verifies that out-of-range parameters for creation, slicing and set ting of WebGL arrays are caught"); 12 description("Verifies that out-of-range parameters for creation, slicing and set ting of WebGL arrays are caught");
13 13
14 function testConstructionWithNullBuffer(type, name) { 14 function testConstructionWithNullBuffer(type, name) {
15 var array; 15 var array;
16 try { 16 try {
17 array = new type(null, 0, 0); 17 array = new type(null, 0, 0);
18 testFailed("Construction of " + name + " with null buffer should throw e xception"); 18 testPassed("Construction of " + name + " with null buffer should not thr ow exception");
19 } catch (e) { 19 } catch (e) {
20 testPassed("Construction of " + name + " with null buffer threw exceptio n"); 20 testFailed("Construction of " + name + " with null buffer threw exceptio n");
21 } 21 }
22 } 22 }
23 23
24 24
25 function testConstructionWithOutOfRangeValues(type, name) { 25 function testConstructionWithOutOfRangeValues(type, name) {
26 var buffer = new ArrayBuffer(4); 26 var buffer = new ArrayBuffer(4);
27 var array; 27 var array;
28 try { 28 try {
29 array = new type(buffer, 4, 0x3FFFFFFF); 29 array = new type(buffer, 4, 0x3FFFFFFF);
30 testFailed("Construction of " + name + " with out-of-range values should throw exception"); 30 testFailed("Construction of " + name + " with out-of-range values should throw exception");
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 floats = new Float32Array(buffer, 0, 10); 137 floats = new Float32Array(buffer, 0, 10);
138 // Plant a NaN into the buffer 138 // Plant a NaN into the buffer
139 ints[0]=-0x7ffff; 139 ints[0]=-0x7ffff;
140 // Read the NaN out as a float 140 // Read the NaN out as a float
141 shouldBeTrue("isNaN(floats[0])"); 141 shouldBeTrue("isNaN(floats[0])");
142 142
143 </script> 143 </script>
144 144
145 </body> 145 </body>
146 </html> 146 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698