| <html> |
| <head> |
| <script src="../../../resources/js-test.js"></script> |
| <script src="resources/webgl-test.js"></script> |
| </head> |
| <body> |
| <div id="description"></div> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("Verifies that the get method, and the set method for individual elements, on the WebGLArray types no longer exist."); |
| |
| debug('Regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=38039">https://bugs.webkit.org/show_bug.cgi?id=38039</a>'); |
| |
| // Global scope so shouldBe* can see it |
| var webGLArray; |
| |
| function negativeTestGetAndSetMethods(typeName) { |
| var type = window[typeName]; |
| webGLArray = new type([2, 3]); |
| shouldBeUndefined("webGLArray.get"); |
| |
| webGLArray.set(0, 1); |
| shouldBe("webGLArray[0]", "2"); |
| shouldBe("webGLArray[1]", "3"); |
| testPassed("webGLArray.set(0, 1) is noop"); |
| } |
| |
| negativeTestGetAndSetMethods("Int8Array"); |
| negativeTestGetAndSetMethods("Uint8Array"); |
| negativeTestGetAndSetMethods("Int16Array"); |
| negativeTestGetAndSetMethods("Uint16Array"); |
| negativeTestGetAndSetMethods("Int32Array"); |
| negativeTestGetAndSetMethods("Uint32Array"); |
| negativeTestGetAndSetMethods("Float32Array"); |
| |
| </script> |
| </body> |
| </html> |