Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: LayoutTests/fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js

Issue 114363002: Structured cloning: improve DataCloneError reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + reset V8TestInterfaceConstructor.cpp result Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/anonymous-slot-with-changes-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.");
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/anonymous-slot-with-changes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698