diff --git a/test/index.html b/test/index.html index b49d07047..8f5bfde82 100644 --- a/test/index.html +++ b/test/index.html @@ -146,7 +146,9 @@ if (!window.Float64Array && window.Uint8Array) { Float64Array = (function() { function Float64Array(buffer, byteOffset, length) { - return new Uint8Array(buffer, byteOffset || 0, length || buffer.byteLength); + return arguments.length == 1 + ? new Uint8Array(buffer) + : new Uint8Array(buffer, byteOffset || 0, length || buffer.byteLength); } setProperty(Float64Array, 'BYTES_PER_ELEMENT', 8); setProperty(Float64Array, 'toString', createToString('Float64Array')); diff --git a/test/test.js b/test/test.js index 1fcc5d65b..abc4487af 100644 --- a/test/test.js +++ b/test/test.js @@ -413,7 +413,9 @@ if (!root.Float64Array) { setProperty(root, 'Float64Array', (function() { function Float64Array(buffer, byteOffset, length) { - return new Uint8Array(buffer, byteOffset || 0, length || buffer.byteLength); + return arguments.length == 1 + ? new Uint8Array(buffer) + : new Uint8Array(buffer, byteOffset || 0, length || buffer.byteLength); } setProperty(Float64Array, 'BYTES_PER_ELEMENT', 8); setProperty(Float64Array, 'toString', createToString('Float64Array'));