Index: LayoutTests/fast/canvas/webgl/data-view-test.html |
=================================================================== |
--- LayoutTests/fast/canvas/webgl/data-view-test.html (revision 79898) |
+++ LayoutTests/fast/canvas/webgl/data-view-test.html (working copy) |
@@ -234,6 +234,17 @@ |
arayBuffer = (new Uint8Array([1, 2])).buffer; |
debug(""); |
+ debug("Test for constructor not called as a function"); |
+ var expr = "DataView(new ArrayBuffer)"; |
+ // Use try/catch instead of calling shouldThrow to avoid different exception message being reported from different platform. |
+ try { |
+ eval(expr); |
+ testFailed(expr + " does not throw exception"); |
+ } catch (e) { |
+ testPassed(expr + " threw exception"); |
+ } |
+ |
+ debug(""); |
debug("Test for constructor taking 1 argument"); |
shouldBeDefined("view = new DataView(arayBuffer)"); |
shouldBe("view.byteOffset", "0"); |