| Index: third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html b/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html
|
| index 7f2eeb862d6f04d195080454b4b5b4c2425f5aeb..ee07a6e0a54c1c6c8cee14e79d7f8146ff7793ae 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/Window/window-postmessage-args.html
|
| @@ -25,6 +25,18 @@ function onmessage(evt) {
|
|
|
| window.addEventListener('message', onmessage, false);
|
|
|
| +function convertDetached(obj) {
|
| + if (obj instanceof Int8Array && obj.byteLength === 0)
|
| + return "[detached TypedArray]";
|
| + return obj;
|
| +}
|
| +
|
| +function convertArrayDetached(obj) {
|
| + if (obj instanceof Array)
|
| + return obj.map(convertDetached)
|
| + return obj;
|
| +}
|
| +
|
| function tryPostMessageFunction(postMessageFunction, first, second, third, shouldFail) {
|
| var pass, reason;
|
| try {
|
| @@ -36,9 +48,9 @@ function tryPostMessageFunction(postMessageFunction, first, second, third, shoul
|
| reason = ": threw exception " + e;
|
| }
|
| if (pass)
|
| - testPassed("Posting message ('" + first + "', " + third + ")" + reason);
|
| + testPassed("Posting message ('" + convertDetached(first) + "', " + convertArrayDetached(third) + ")" + reason);
|
| else
|
| - testFailed("Posting message ('" + first + "', " + third + ")" + reason);
|
| + testFailed("Posting message ('" + convertDetached(first) + "', " + convertArrayDetached(third) + ")" + reason);
|
| }
|
|
|
| function tryPostMessage(first, second, third, shouldFail) {
|
|
|