Index: LayoutTests/fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js |
diff --git a/LayoutTests/fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js b/LayoutTests/fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js |
index a239803dbaef0008d44f1fb192faa02fc13eb44c..a2f3a1efd1772dde80be72461f0b3256ebfdddb8 100644 |
--- a/LayoutTests/fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js |
+++ b/LayoutTests/fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js |
@@ -31,7 +31,7 @@ var allBufferTypes = |
["Uint16", Uint16Array, 2], |
["Float32", Float32Array, 4], |
["Float64", Float64Array, 8], |
- ["DataView", DataView, 1] |
+ ["DataView", DataView, 1] |
]; |
function isTypedArray(view) |
@@ -55,6 +55,11 @@ function isArrayBuffer(buffer) |
return (buffer instanceof ArrayBuffer); |
} |
+function isDataCloneError(e) |
+{ |
+ return (e.name === "DataCloneError"); |
+} |
+ |
function assertBufferClosed(testName, buffer) |
{ |
if (buffer === null) { |
@@ -257,6 +262,10 @@ function wrapFailSend(testName, message, xfer) |
try { |
window.postMessage(message, '*', xfer); |
} catch (e) { |
+ if (!isDataCloneError(e)) { |
+ testFailed(testName + ": expected postMessage to throw DataCloneError but it didn't."); |
+ return false; |
+ } |
return true; |
} |
testFailed(testName + ": expected postMessage to fail but it didn't."); |