| 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 when constructing WebGLArray with nan values, it resu
lts in a 0"); | |
| 13 | |
| 14 var source, target, idx; | |
| 15 | |
| 16 source = new Array(10); | |
| 17 | |
| 18 target = new Uint8Array(source); | |
| 19 shouldBe(target.length.toString(), source.length.toString()) | |
| 20 for (idx = 0; idx < target.length; idx++) { | |
| 21 shouldBeZero(target[idx].toString()); | |
| 22 } | |
| 23 | |
| 24 source = {length: 10}; | |
| 25 target = new Uint8Array(source); | |
| 26 shouldBe(target.length.toString(), source.length.toString()) | |
| 27 for (idx = 0; idx < target.length; idx++) { | |
| 28 shouldBeZero(target[idx].toString()); | |
| 29 } | |
| 30 | |
| 31 </script> | |
| 32 | |
| 33 </body> | |
| 34 </html> | |
| 35 | |
| OLD | NEW |