| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../../resources/js-test.js"></script> | |
| 4 <script src="resources/webgl-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <div id="description"></div> | |
| 8 <div id="console"></div> | |
| 9 | |
| 10 <script> | |
| 11 | |
| 12 description("Verifies that calling the indexing operator on WebGLArrays with out
-of-range indices returns undefined."); | |
| 13 | |
| 14 debug('Regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=3803
9">https://bugs.webkit.org/show_bug.cgi?id=38039</a>'); | |
| 15 | |
| 16 // Global scope so shouldThrow can see it | |
| 17 var webGLArray; | |
| 18 | |
| 19 function testGetWithOutOfRangeIndices(typeName) { | |
| 20 var type = window[typeName]; | |
| 21 webGLArray = new type([2, 3]); | |
| 22 shouldBeUndefined("webGLArray[2]"); | |
| 23 shouldBeUndefined("webGLArray[-1]"); | |
| 24 shouldBeUndefined("webGLArray[0x20000000]"); | |
| 25 } | |
| 26 | |
| 27 testGetWithOutOfRangeIndices("Int8Array"); | |
| 28 testGetWithOutOfRangeIndices("Uint8Array"); | |
| 29 testGetWithOutOfRangeIndices("Int16Array"); | |
| 30 testGetWithOutOfRangeIndices("Uint16Array"); | |
| 31 testGetWithOutOfRangeIndices("Int32Array"); | |
| 32 testGetWithOutOfRangeIndices("Uint32Array"); | |
| 33 testGetWithOutOfRangeIndices("Float32Array"); | |
| 34 | |
| 35 </script> | |
| 36 | |
| 37 </body> | |
| 38 </html> | |
| OLD | NEW |