From ece66bb8e793ac03d11fe8f0b52f79bc1a030519 Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Mon, 25 Oct 2021 03:44:43 +0000 Subject: [PATCH] Throw `DataCloneError` when transferring non-transferable objects Currently attempting to transfer non-transferable objects using the structured clone algorithm throws a `TypeError`, rather than a `DataCloneError` `DOMException` as per the spec. This seems like a holdover from the original definition of transferable objects as the `Transferable` WebIDL type, since transfer lists would be defined as `sequence` and so would throw a `TypeError` on conversion. https://github.com/whatwg/html/pull/727 changed transfer lists to be `sequence` and changed the `StructuredCloneWithTransfer` algorithm (now `StructuredSerializeWithTransfer`) to throw a `DataCloneError` `DOMException` if any element in the transfer list is not transferable. Bug: 816447 Change-Id: I9f4f88a2d7a593766f394256606a688f299c7b57 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3229544 Reviewed-by: Yuki Shiino Reviewed-by: Kentaro Hara Commit-Queue: Yuki Shiino Cr-Commit-Position: refs/heads/main@{#934398} --- AUTHORS | 1 + .../serialization/serialized_script_value.cc | 11 +- .../messagechannel.any-expected.txt | 134 ------------------ ...sagechannel.any.serviceworker-expected.txt | 119 ---------------- ...ssagechannel.any.sharedworker-expected.txt | 119 ---------------- .../messagechannel.any.worker-expected.txt | 119 ---------------- .../transfer-errors.window-expected.txt | 20 --- .../window-postmessage.window-expected.txt | 134 ------------------ .../wpt/webcodecs/encoded-audio-chunk.any.js | 3 +- .../wpt/webcodecs/encoded-video-chunk.any.js | 3 +- .../web_tests/external/wpt/webcodecs/utils.js | 5 +- .../workers/Worker-multi-port-expected.txt | 16 --- .../structured-clone/dedicated-expected.txt | 134 ------------------ .../structured-clone/shared-expected.txt | 134 ------------------ .../window-postmessage-args-expected.txt | 2 +- .../events/message-port-clone-expected.txt | 2 +- .../fast/events/message-port-clone.html | 2 +- .../events/message-port-multi-expected.txt | 4 +- .../events/resources/message-port-multi.js | 4 +- .../worker-context-multi-port-expected.txt | 4 +- .../workers/worker-onerror-09-expected.txt | 2 +- .../fast/workers/worker-onerror-09.html | 2 +- 22 files changed, 26 insertions(+), 948 deletions(-) delete mode 100644 third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any-expected.txt delete mode 100644 third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.serviceworker-expected.txt delete mode 100644 third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.sharedworker-expected.txt delete mode 100644 third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.worker-expected.txt delete mode 100644 third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt delete mode 100644 third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/window-postmessage.window-expected.txt delete mode 100644 third_party/blink/web_tests/external/wpt/workers/Worker-multi-port-expected.txt delete mode 100644 third_party/blink/web_tests/external/wpt/workers/semantics/structured-clone/dedicated-expected.txt delete mode 100644 third_party/blink/web_tests/external/wpt/workers/semantics/structured-clone/shared-expected.txt diff --git a/AUTHORS b/AUTHORS index a16750dbd34ad6..9e81ec7b6a2bbf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -92,6 +92,7 @@ Andreas Papacharalampous Andrei Borza Andrei Parvu Andrei Parvu +Andreu Botella Andrew Boyarshin Andrew Brampton Andrew Brindamour diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.cc b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.cc index ef6c9a2fefa4c8..c1bb7ac27607f8 100644 --- a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.cc +++ b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.cc @@ -530,16 +530,19 @@ bool SerializedScriptValue::ExtractTransferables( v8::Local value = script_value.V8Value(); // Validation of non-null objects, per HTML5 spec 10.3.3. if (IsUndefinedOrNull(value)) { - exception_state.ThrowTypeError( + exception_state.ThrowDOMException( + DOMExceptionCode::kDataCloneError, "Value at index " + String::Number(i) + " is an untransferable " + - (value->IsUndefined() ? "'undefined'" : "'null'") + " value."); + (value->IsUndefined() ? "'undefined'" : "'null'") + " value."); return false; } if (!factory.ExtractTransferable(isolate, value, i, transferables, exception_state)) { if (!exception_state.HadException()) { - exception_state.ThrowTypeError("Value at index " + String::Number(i) + - " does not have a transferable type."); + exception_state.ThrowDOMException( + DOMExceptionCode::kDataCloneError, + "Value at index " + String::Number(i) + + " does not have a transferable type."); } return false; } diff --git a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any-expected.txt b/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any-expected.txt deleted file mode 100644 index d297034dbb3fa9..00000000000000 --- a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any-expected.txt +++ /dev/null @@ -1,134 +0,0 @@ -This is a testharness.js-based test. -Found 130 tests; 129 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS primitive undefined -PASS primitive null -PASS primitive true -PASS primitive false -PASS primitive string, empty string -PASS primitive string, lone high surrogate -PASS primitive string, lone low surrogate -PASS primitive string, NUL -PASS primitive string, astral character -PASS primitive number, 0.2 -PASS primitive number, 0 -PASS primitive number, -0 -PASS primitive number, NaN -PASS primitive number, Infinity -PASS primitive number, -Infinity -PASS primitive number, 9007199254740992 -PASS primitive number, -9007199254740992 -PASS primitive number, 9007199254740994 -PASS primitive number, -9007199254740994 -PASS primitive BigInt, 0n -PASS primitive BigInt, -0n -PASS primitive BigInt, -9007199254740994000n -PASS primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n -PASS Array primitives -PASS Object primitives -PASS Boolean true -PASS Boolean false -PASS Array Boolean objects -PASS Object Boolean objects -PASS String empty string -PASS String lone high surrogate -PASS String lone low surrogate -PASS String NUL -PASS String astral character -PASS Array String objects -PASS Object String objects -PASS Number 0.2 -PASS Number 0 -PASS Number -0 -PASS Number NaN -PASS Number Infinity -PASS Number -Infinity -PASS Number 9007199254740992 -PASS Number -9007199254740992 -PASS Number 9007199254740994 -PASS Number -9007199254740994 -PASS BigInt -9007199254740994n -PASS Array Number objects -PASS Object Number objects -PASS Date 0 -PASS Date -0 -PASS Date -8.64e15 -PASS Date 8.64e15 -PASS Array Date objects -PASS Object Date objects -PASS RegExp flags and lastIndex -PASS RegExp sticky flag -PASS RegExp unicode flag -PASS RegExp empty -PASS RegExp slash -PASS RegExp new line -PASS Array RegExp object, RegExp flags and lastIndex -PASS Array RegExp object, RegExp sticky flag -PASS Array RegExp object, RegExp unicode flag -PASS Array RegExp object, RegExp empty -PASS Array RegExp object, RegExp slash -PASS Array RegExp object, RegExp new line -PASS Object RegExp object, RegExp flags and lastIndex -PASS Object RegExp object, RegExp sticky flag -PASS Object RegExp object, RegExp unicode flag -PASS Object RegExp object, RegExp empty -PASS Object RegExp object, RegExp slash -PASS Object RegExp object, RegExp new line -PASS Blob basic -PASS Blob unpaired high surrogate (invalid utf-8) -PASS Blob unpaired low surrogate (invalid utf-8) -PASS Blob paired surrogates (invalid utf-8) -PASS Blob empty -PASS Blob NUL -PASS Array Blob object, Blob basic -PASS Array Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Array Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Array Blob object, Blob paired surrogates (invalid utf-8) -PASS Array Blob object, Blob empty -PASS Array Blob object, Blob NUL -PASS Array Blob object, two Blobs -PASS Object Blob object, Blob basic -PASS Object Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Object Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Object Blob object, Blob paired surrogates (invalid utf-8) -PASS Object Blob object, Blob empty -PASS Object Blob object, Blob NUL -PASS File basic -PASS FileList empty -PASS Array FileList object, FileList empty -PASS Object FileList object, FileList empty -PASS ImageData 1x1 transparent black -PASS ImageData 1x1 non-transparent non-black -PASS Array ImageData object, ImageData 1x1 transparent black -PASS Array ImageData object, ImageData 1x1 non-transparent non-black -PASS Object ImageData object, ImageData 1x1 transparent black -PASS Object ImageData object, ImageData 1x1 non-transparent non-black -PASS Array sparse -PASS Array with non-index property -PASS Object with index property and length -PASS Array with circular reference -PASS Object with circular reference -PASS Array with identical property values -PASS Object with identical property values -PASS Object with property on prototype -PASS Object with non-enumerable property -PASS Object with non-writable property -PASS Object with non-configurable property -PASS ImageBitmap 1x1 transparent black -PASS ImageBitmap 1x1 non-transparent non-black -PASS Array ImageBitmap object, ImageBitmap 1x1 transparent black -PASS Array ImageBitmap object, ImageBitmap 1x1 transparent non-black -PASS Object ImageBitmap object, ImageBitmap 1x1 transparent black -PASS Object ImageBitmap object, ImageBitmap 1x1 transparent non-black -PASS ObjectPrototype must lose its exotic-ness when cloned -PASS Serializing a non-serializable platform object fails -PASS An object whose interface is deleted from the global must still deserialize -PASS A subclass instance will deserialize as its closest serializable superclass -PASS ArrayBuffer -PASS MessagePort -PASS A detached ArrayBuffer cannot be transferred -PASS A detached platform object cannot be transferred -FAIL Transferring a non-transferable platform object fails promise_rejects_dom: function "function() { throw e }" threw object "TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -PASS An object whose interface is deleted from the global object must still be received -PASS A subclass instance will be received as its closest transferable superclass -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.serviceworker-expected.txt b/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.serviceworker-expected.txt deleted file mode 100644 index 7123d51e4ed527..00000000000000 --- a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.serviceworker-expected.txt +++ /dev/null @@ -1,119 +0,0 @@ -This is a testharness.js-based test. -Found 115 tests; 114 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS primitive undefined -PASS primitive null -PASS primitive true -PASS primitive false -PASS primitive string, empty string -PASS primitive string, lone high surrogate -PASS primitive string, lone low surrogate -PASS primitive string, NUL -PASS primitive string, astral character -PASS primitive number, 0.2 -PASS primitive number, 0 -PASS primitive number, -0 -PASS primitive number, NaN -PASS primitive number, Infinity -PASS primitive number, -Infinity -PASS primitive number, 9007199254740992 -PASS primitive number, -9007199254740992 -PASS primitive number, 9007199254740994 -PASS primitive number, -9007199254740994 -PASS primitive BigInt, 0n -PASS primitive BigInt, -0n -PASS primitive BigInt, -9007199254740994000n -PASS primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n -PASS Array primitives -PASS Object primitives -PASS Boolean true -PASS Boolean false -PASS Array Boolean objects -PASS Object Boolean objects -PASS String empty string -PASS String lone high surrogate -PASS String lone low surrogate -PASS String NUL -PASS String astral character -PASS Array String objects -PASS Object String objects -PASS Number 0.2 -PASS Number 0 -PASS Number -0 -PASS Number NaN -PASS Number Infinity -PASS Number -Infinity -PASS Number 9007199254740992 -PASS Number -9007199254740992 -PASS Number 9007199254740994 -PASS Number -9007199254740994 -PASS BigInt -9007199254740994n -PASS Array Number objects -PASS Object Number objects -PASS Date 0 -PASS Date -0 -PASS Date -8.64e15 -PASS Date 8.64e15 -PASS Array Date objects -PASS Object Date objects -PASS RegExp flags and lastIndex -PASS RegExp sticky flag -PASS RegExp unicode flag -PASS RegExp empty -PASS RegExp slash -PASS RegExp new line -PASS Array RegExp object, RegExp flags and lastIndex -PASS Array RegExp object, RegExp sticky flag -PASS Array RegExp object, RegExp unicode flag -PASS Array RegExp object, RegExp empty -PASS Array RegExp object, RegExp slash -PASS Array RegExp object, RegExp new line -PASS Object RegExp object, RegExp flags and lastIndex -PASS Object RegExp object, RegExp sticky flag -PASS Object RegExp object, RegExp unicode flag -PASS Object RegExp object, RegExp empty -PASS Object RegExp object, RegExp slash -PASS Object RegExp object, RegExp new line -PASS Blob basic -PASS Blob unpaired high surrogate (invalid utf-8) -PASS Blob unpaired low surrogate (invalid utf-8) -PASS Blob paired surrogates (invalid utf-8) -PASS Blob empty -PASS Blob NUL -PASS Array Blob object, Blob basic -PASS Array Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Array Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Array Blob object, Blob paired surrogates (invalid utf-8) -PASS Array Blob object, Blob empty -PASS Array Blob object, Blob NUL -PASS Array Blob object, two Blobs -PASS Object Blob object, Blob basic -PASS Object Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Object Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Object Blob object, Blob paired surrogates (invalid utf-8) -PASS Object Blob object, Blob empty -PASS Object Blob object, Blob NUL -PASS File basic -PASS Array sparse -PASS Array with non-index property -PASS Object with index property and length -PASS Array with circular reference -PASS Object with circular reference -PASS Array with identical property values -PASS Object with identical property values -PASS Object with property on prototype -PASS Object with non-enumerable property -PASS Object with non-writable property -PASS Object with non-configurable property -PASS ObjectPrototype must lose its exotic-ness when cloned -PASS Serializing a non-serializable platform object fails -PASS An object whose interface is deleted from the global must still deserialize -PASS A subclass instance will deserialize as its closest serializable superclass -PASS ArrayBuffer -PASS MessagePort -PASS A detached ArrayBuffer cannot be transferred -PASS A detached platform object cannot be transferred -FAIL Transferring a non-transferable platform object fails promise_rejects_dom: function "function() { throw e }" threw object "TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -PASS An object whose interface is deleted from the global object must still be received -PASS A subclass instance will be received as its closest transferable superclass -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.sharedworker-expected.txt b/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.sharedworker-expected.txt deleted file mode 100644 index 7123d51e4ed527..00000000000000 --- a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.sharedworker-expected.txt +++ /dev/null @@ -1,119 +0,0 @@ -This is a testharness.js-based test. -Found 115 tests; 114 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS primitive undefined -PASS primitive null -PASS primitive true -PASS primitive false -PASS primitive string, empty string -PASS primitive string, lone high surrogate -PASS primitive string, lone low surrogate -PASS primitive string, NUL -PASS primitive string, astral character -PASS primitive number, 0.2 -PASS primitive number, 0 -PASS primitive number, -0 -PASS primitive number, NaN -PASS primitive number, Infinity -PASS primitive number, -Infinity -PASS primitive number, 9007199254740992 -PASS primitive number, -9007199254740992 -PASS primitive number, 9007199254740994 -PASS primitive number, -9007199254740994 -PASS primitive BigInt, 0n -PASS primitive BigInt, -0n -PASS primitive BigInt, -9007199254740994000n -PASS primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n -PASS Array primitives -PASS Object primitives -PASS Boolean true -PASS Boolean false -PASS Array Boolean objects -PASS Object Boolean objects -PASS String empty string -PASS String lone high surrogate -PASS String lone low surrogate -PASS String NUL -PASS String astral character -PASS Array String objects -PASS Object String objects -PASS Number 0.2 -PASS Number 0 -PASS Number -0 -PASS Number NaN -PASS Number Infinity -PASS Number -Infinity -PASS Number 9007199254740992 -PASS Number -9007199254740992 -PASS Number 9007199254740994 -PASS Number -9007199254740994 -PASS BigInt -9007199254740994n -PASS Array Number objects -PASS Object Number objects -PASS Date 0 -PASS Date -0 -PASS Date -8.64e15 -PASS Date 8.64e15 -PASS Array Date objects -PASS Object Date objects -PASS RegExp flags and lastIndex -PASS RegExp sticky flag -PASS RegExp unicode flag -PASS RegExp empty -PASS RegExp slash -PASS RegExp new line -PASS Array RegExp object, RegExp flags and lastIndex -PASS Array RegExp object, RegExp sticky flag -PASS Array RegExp object, RegExp unicode flag -PASS Array RegExp object, RegExp empty -PASS Array RegExp object, RegExp slash -PASS Array RegExp object, RegExp new line -PASS Object RegExp object, RegExp flags and lastIndex -PASS Object RegExp object, RegExp sticky flag -PASS Object RegExp object, RegExp unicode flag -PASS Object RegExp object, RegExp empty -PASS Object RegExp object, RegExp slash -PASS Object RegExp object, RegExp new line -PASS Blob basic -PASS Blob unpaired high surrogate (invalid utf-8) -PASS Blob unpaired low surrogate (invalid utf-8) -PASS Blob paired surrogates (invalid utf-8) -PASS Blob empty -PASS Blob NUL -PASS Array Blob object, Blob basic -PASS Array Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Array Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Array Blob object, Blob paired surrogates (invalid utf-8) -PASS Array Blob object, Blob empty -PASS Array Blob object, Blob NUL -PASS Array Blob object, two Blobs -PASS Object Blob object, Blob basic -PASS Object Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Object Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Object Blob object, Blob paired surrogates (invalid utf-8) -PASS Object Blob object, Blob empty -PASS Object Blob object, Blob NUL -PASS File basic -PASS Array sparse -PASS Array with non-index property -PASS Object with index property and length -PASS Array with circular reference -PASS Object with circular reference -PASS Array with identical property values -PASS Object with identical property values -PASS Object with property on prototype -PASS Object with non-enumerable property -PASS Object with non-writable property -PASS Object with non-configurable property -PASS ObjectPrototype must lose its exotic-ness when cloned -PASS Serializing a non-serializable platform object fails -PASS An object whose interface is deleted from the global must still deserialize -PASS A subclass instance will deserialize as its closest serializable superclass -PASS ArrayBuffer -PASS MessagePort -PASS A detached ArrayBuffer cannot be transferred -PASS A detached platform object cannot be transferred -FAIL Transferring a non-transferable platform object fails promise_rejects_dom: function "function() { throw e }" threw object "TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -PASS An object whose interface is deleted from the global object must still be received -PASS A subclass instance will be received as its closest transferable superclass -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.worker-expected.txt b/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.worker-expected.txt deleted file mode 100644 index 7123d51e4ed527..00000000000000 --- a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.worker-expected.txt +++ /dev/null @@ -1,119 +0,0 @@ -This is a testharness.js-based test. -Found 115 tests; 114 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS primitive undefined -PASS primitive null -PASS primitive true -PASS primitive false -PASS primitive string, empty string -PASS primitive string, lone high surrogate -PASS primitive string, lone low surrogate -PASS primitive string, NUL -PASS primitive string, astral character -PASS primitive number, 0.2 -PASS primitive number, 0 -PASS primitive number, -0 -PASS primitive number, NaN -PASS primitive number, Infinity -PASS primitive number, -Infinity -PASS primitive number, 9007199254740992 -PASS primitive number, -9007199254740992 -PASS primitive number, 9007199254740994 -PASS primitive number, -9007199254740994 -PASS primitive BigInt, 0n -PASS primitive BigInt, -0n -PASS primitive BigInt, -9007199254740994000n -PASS primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n -PASS Array primitives -PASS Object primitives -PASS Boolean true -PASS Boolean false -PASS Array Boolean objects -PASS Object Boolean objects -PASS String empty string -PASS String lone high surrogate -PASS String lone low surrogate -PASS String NUL -PASS String astral character -PASS Array String objects -PASS Object String objects -PASS Number 0.2 -PASS Number 0 -PASS Number -0 -PASS Number NaN -PASS Number Infinity -PASS Number -Infinity -PASS Number 9007199254740992 -PASS Number -9007199254740992 -PASS Number 9007199254740994 -PASS Number -9007199254740994 -PASS BigInt -9007199254740994n -PASS Array Number objects -PASS Object Number objects -PASS Date 0 -PASS Date -0 -PASS Date -8.64e15 -PASS Date 8.64e15 -PASS Array Date objects -PASS Object Date objects -PASS RegExp flags and lastIndex -PASS RegExp sticky flag -PASS RegExp unicode flag -PASS RegExp empty -PASS RegExp slash -PASS RegExp new line -PASS Array RegExp object, RegExp flags and lastIndex -PASS Array RegExp object, RegExp sticky flag -PASS Array RegExp object, RegExp unicode flag -PASS Array RegExp object, RegExp empty -PASS Array RegExp object, RegExp slash -PASS Array RegExp object, RegExp new line -PASS Object RegExp object, RegExp flags and lastIndex -PASS Object RegExp object, RegExp sticky flag -PASS Object RegExp object, RegExp unicode flag -PASS Object RegExp object, RegExp empty -PASS Object RegExp object, RegExp slash -PASS Object RegExp object, RegExp new line -PASS Blob basic -PASS Blob unpaired high surrogate (invalid utf-8) -PASS Blob unpaired low surrogate (invalid utf-8) -PASS Blob paired surrogates (invalid utf-8) -PASS Blob empty -PASS Blob NUL -PASS Array Blob object, Blob basic -PASS Array Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Array Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Array Blob object, Blob paired surrogates (invalid utf-8) -PASS Array Blob object, Blob empty -PASS Array Blob object, Blob NUL -PASS Array Blob object, two Blobs -PASS Object Blob object, Blob basic -PASS Object Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Object Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Object Blob object, Blob paired surrogates (invalid utf-8) -PASS Object Blob object, Blob empty -PASS Object Blob object, Blob NUL -PASS File basic -PASS Array sparse -PASS Array with non-index property -PASS Object with index property and length -PASS Array with circular reference -PASS Object with circular reference -PASS Array with identical property values -PASS Object with identical property values -PASS Object with property on prototype -PASS Object with non-enumerable property -PASS Object with non-writable property -PASS Object with non-configurable property -PASS ObjectPrototype must lose its exotic-ness when cloned -PASS Serializing a non-serializable platform object fails -PASS An object whose interface is deleted from the global must still deserialize -PASS A subclass instance will deserialize as its closest serializable superclass -PASS ArrayBuffer -PASS MessagePort -PASS A detached ArrayBuffer cannot be transferred -PASS A detached platform object cannot be transferred -FAIL Transferring a non-transferable platform object fails promise_rejects_dom: function "function() { throw e }" threw object "TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -PASS An object whose interface is deleted from the global object must still be received -PASS A subclass instance will be received as its closest transferable superclass -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt b/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt deleted file mode 100644 index 3fec8d0c8f9880..00000000000000 --- a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt +++ /dev/null @@ -1,20 +0,0 @@ -This is a testharness.js-based test. -FAIL Cannot transfer all objects assert_throws_dom: function "() => self.postMessage({ get whatever() { throw new Error("You should not have gotten to this point") } }, "*", transferList)" threw object "TypeError: Failed to execute 'postMessage' on 'Window': Value at index 0 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -PASS Cannot transfer the same ArrayBuffer twice -PASS Serialize should make the ArrayBuffer detached, so it cannot be transferred again -PASS Serialize should throw before a detached ArrayBuffer is found -PASS Cannot transfer ArrayBuffer detached while the message was serialized -PASS Cannot transfer the same MessagePort twice -PASS Serialize should make the MessagePort detached, so it cannot be transferred again -PASS Serialize should throw before a detached MessagePort is found -PASS Cannot transfer MessagePort detached while the message was serialized -PASS Cannot transfer the same ImageBitmap twice -PASS Serialize should make the ImageBitmap detached, so it cannot be transferred again -PASS Serialize should throw before a detached ImageBitmap is found -PASS Cannot transfer ImageBitmap detached while the message was serialized -PASS Cannot transfer the same OffscreenCanvas twice -PASS Serialize should make the OffscreenCanvas detached, so it cannot be transferred again -PASS Serialize should throw before a detached OffscreenCanvas is found -PASS Cannot transfer OffscreenCanvas detached while the message was serialized -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/window-postmessage.window-expected.txt b/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/window-postmessage.window-expected.txt deleted file mode 100644 index 389ca8a10af4eb..00000000000000 --- a/third_party/blink/web_tests/external/wpt/html/infrastructure/safe-passing-of-structured-data/window-postmessage.window-expected.txt +++ /dev/null @@ -1,134 +0,0 @@ -This is a testharness.js-based test. -Found 130 tests; 129 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS primitive undefined -PASS primitive null -PASS primitive true -PASS primitive false -PASS primitive string, empty string -PASS primitive string, lone high surrogate -PASS primitive string, lone low surrogate -PASS primitive string, NUL -PASS primitive string, astral character -PASS primitive number, 0.2 -PASS primitive number, 0 -PASS primitive number, -0 -PASS primitive number, NaN -PASS primitive number, Infinity -PASS primitive number, -Infinity -PASS primitive number, 9007199254740992 -PASS primitive number, -9007199254740992 -PASS primitive number, 9007199254740994 -PASS primitive number, -9007199254740994 -PASS primitive BigInt, 0n -PASS primitive BigInt, -0n -PASS primitive BigInt, -9007199254740994000n -PASS primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n -PASS Array primitives -PASS Object primitives -PASS Boolean true -PASS Boolean false -PASS Array Boolean objects -PASS Object Boolean objects -PASS String empty string -PASS String lone high surrogate -PASS String lone low surrogate -PASS String NUL -PASS String astral character -PASS Array String objects -PASS Object String objects -PASS Number 0.2 -PASS Number 0 -PASS Number -0 -PASS Number NaN -PASS Number Infinity -PASS Number -Infinity -PASS Number 9007199254740992 -PASS Number -9007199254740992 -PASS Number 9007199254740994 -PASS Number -9007199254740994 -PASS BigInt -9007199254740994n -PASS Array Number objects -PASS Object Number objects -PASS Date 0 -PASS Date -0 -PASS Date -8.64e15 -PASS Date 8.64e15 -PASS Array Date objects -PASS Object Date objects -PASS RegExp flags and lastIndex -PASS RegExp sticky flag -PASS RegExp unicode flag -PASS RegExp empty -PASS RegExp slash -PASS RegExp new line -PASS Array RegExp object, RegExp flags and lastIndex -PASS Array RegExp object, RegExp sticky flag -PASS Array RegExp object, RegExp unicode flag -PASS Array RegExp object, RegExp empty -PASS Array RegExp object, RegExp slash -PASS Array RegExp object, RegExp new line -PASS Object RegExp object, RegExp flags and lastIndex -PASS Object RegExp object, RegExp sticky flag -PASS Object RegExp object, RegExp unicode flag -PASS Object RegExp object, RegExp empty -PASS Object RegExp object, RegExp slash -PASS Object RegExp object, RegExp new line -PASS Blob basic -PASS Blob unpaired high surrogate (invalid utf-8) -PASS Blob unpaired low surrogate (invalid utf-8) -PASS Blob paired surrogates (invalid utf-8) -PASS Blob empty -PASS Blob NUL -PASS Array Blob object, Blob basic -PASS Array Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Array Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Array Blob object, Blob paired surrogates (invalid utf-8) -PASS Array Blob object, Blob empty -PASS Array Blob object, Blob NUL -PASS Array Blob object, two Blobs -PASS Object Blob object, Blob basic -PASS Object Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Object Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Object Blob object, Blob paired surrogates (invalid utf-8) -PASS Object Blob object, Blob empty -PASS Object Blob object, Blob NUL -PASS File basic -PASS FileList empty -PASS Array FileList object, FileList empty -PASS Object FileList object, FileList empty -PASS ImageData 1x1 transparent black -PASS ImageData 1x1 non-transparent non-black -PASS Array ImageData object, ImageData 1x1 transparent black -PASS Array ImageData object, ImageData 1x1 non-transparent non-black -PASS Object ImageData object, ImageData 1x1 transparent black -PASS Object ImageData object, ImageData 1x1 non-transparent non-black -PASS Array sparse -PASS Array with non-index property -PASS Object with index property and length -PASS Array with circular reference -PASS Object with circular reference -PASS Array with identical property values -PASS Object with identical property values -PASS Object with property on prototype -PASS Object with non-enumerable property -PASS Object with non-writable property -PASS Object with non-configurable property -PASS ImageBitmap 1x1 transparent black -PASS ImageBitmap 1x1 non-transparent non-black -PASS Array ImageBitmap object, ImageBitmap 1x1 transparent black -PASS Array ImageBitmap object, ImageBitmap 1x1 transparent non-black -PASS Object ImageBitmap object, ImageBitmap 1x1 transparent black -PASS Object ImageBitmap object, ImageBitmap 1x1 transparent non-black -PASS ObjectPrototype must lose its exotic-ness when cloned -PASS Serializing a non-serializable platform object fails -PASS An object whose interface is deleted from the global must still deserialize -PASS A subclass instance will deserialize as its closest serializable superclass -PASS ArrayBuffer -PASS MessagePort -PASS A detached ArrayBuffer cannot be transferred -PASS A detached platform object cannot be transferred -FAIL Transferring a non-transferable platform object fails promise_rejects_dom: function "function() { throw e }" threw object "TypeError: Failed to execute 'postMessage' on 'Window': Value at index 0 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -PASS An object whose interface is deleted from the global object must still be received -PASS A subclass instance will be received as its closest transferable superclass -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/external/wpt/webcodecs/encoded-audio-chunk.any.js b/third_party/blink/web_tests/external/wpt/webcodecs/encoded-audio-chunk.any.js index 00589123c0501d..1ada120e4d91a3 100644 --- a/third_party/blink/web_tests/external/wpt/webcodecs/encoded-audio-chunk.any.js +++ b/third_party/blink/web_tests/external/wpt/webcodecs/encoded-audio-chunk.any.js @@ -38,7 +38,8 @@ test(t => { TypeError, () => chunk.copyTo(new Uint8Array(2)), 'destination is not large enough'); + const detached = makeDetachedArrayBuffer(); assert_throws_js( TypeError, - () => chunk.copyTo(makeDetachedArrayBuffer()), 'destination is detached'); + () => chunk.copyTo(detached), 'destination is detached'); }, 'Test copyTo() exception if destination invalid'); diff --git a/third_party/blink/web_tests/external/wpt/webcodecs/encoded-video-chunk.any.js b/third_party/blink/web_tests/external/wpt/webcodecs/encoded-video-chunk.any.js index 70131757521526..0cf0d8de4408dc 100644 --- a/third_party/blink/web_tests/external/wpt/webcodecs/encoded-video-chunk.any.js +++ b/third_party/blink/web_tests/external/wpt/webcodecs/encoded-video-chunk.any.js @@ -38,7 +38,8 @@ test(t => { TypeError, () => chunk.copyTo(new Uint8Array(2)), 'destination is not large enough'); + const detached = makeDetachedArrayBuffer(); assert_throws_js( TypeError, - () => chunk.copyTo(makeDetachedArrayBuffer()), 'destiation is detached'); + () => chunk.copyTo(detached), 'destination is detached'); }, 'Test copyTo() exception if destiation invalid'); \ No newline at end of file diff --git a/third_party/blink/web_tests/external/wpt/webcodecs/utils.js b/third_party/blink/web_tests/external/wpt/webcodecs/utils.js index 814d435666b648..2dcfefa0a0ef9c 100644 --- a/third_party/blink/web_tests/external/wpt/webcodecs/utils.js +++ b/third_party/blink/web_tests/external/wpt/webcodecs/utils.js @@ -195,7 +195,8 @@ function testCanvas(ctx, width, height, expected_pixel, imageSetting, assert_com } function makeDetachedArrayBuffer() { - let buffer = new Uint8Array(); + const buffer = new ArrayBuffer(10); + const view = new Uint8Array(buffer); new MessageChannel().port1.postMessage(buffer, [buffer]); - return buffer; + return view; } diff --git a/third_party/blink/web_tests/external/wpt/workers/Worker-multi-port-expected.txt b/third_party/blink/web_tests/external/wpt/workers/Worker-multi-port-expected.txt deleted file mode 100644 index 92b2f394fc152b..00000000000000 --- a/third_party/blink/web_tests/external/wpt/workers/Worker-multi-port-expected.txt +++ /dev/null @@ -1,16 +0,0 @@ -This is a testharness.js-based test. -PASS Test postMessage with no port. -PASS Test postMessage with no arguments. -PASS Test postMessage with no ports and empty array. -PASS Test postMessage with two ports. -PASS Test empty postMessage throws exception. -PASS Test postMessage with null ports throws exception. -FAIL Test postMessage with incorrect ports throws exception assert_throws_dom: postMessage with incorrect ports should throw exception. function "function() { worker.postMessage("notAPort", - [channel.port1, {}, - channel.port2]); }" threw object "TypeError: Failed to execute 'postMessage' on 'Worker': Value at index 1 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -FAIL Test postMessage without sequence throws exception assert_throws_dom: postMessage without sequence should throw exception. function "function() { worker.postMessage("notASequence", [{length: 3}]) }" threw object "TypeError: Failed to execute 'postMessage' on 'Worker': Value at index 0 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -FAIL Test postMessage on channel with previous failed postMessage calls. assert_throws_dom: postMessage with incorrect ports should throw exception. function "function() { worker.postMessage("notAPort", - [channel.port1, {}, - channel.port2]); }" threw object "TypeError: Failed to execute 'postMessage' on 'Worker': Value at index 1 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/external/wpt/workers/semantics/structured-clone/dedicated-expected.txt b/third_party/blink/web_tests/external/wpt/workers/semantics/structured-clone/dedicated-expected.txt deleted file mode 100644 index e0e614f9dac031..00000000000000 --- a/third_party/blink/web_tests/external/wpt/workers/semantics/structured-clone/dedicated-expected.txt +++ /dev/null @@ -1,134 +0,0 @@ -This is a testharness.js-based test. -Found 130 tests; 129 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS primitive undefined -PASS primitive null -PASS primitive true -PASS primitive false -PASS primitive string, empty string -PASS primitive string, lone high surrogate -PASS primitive string, lone low surrogate -PASS primitive string, NUL -PASS primitive string, astral character -PASS primitive number, 0.2 -PASS primitive number, 0 -PASS primitive number, -0 -PASS primitive number, NaN -PASS primitive number, Infinity -PASS primitive number, -Infinity -PASS primitive number, 9007199254740992 -PASS primitive number, -9007199254740992 -PASS primitive number, 9007199254740994 -PASS primitive number, -9007199254740994 -PASS primitive BigInt, 0n -PASS primitive BigInt, -0n -PASS primitive BigInt, -9007199254740994000n -PASS primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n -PASS Array primitives -PASS Object primitives -PASS Boolean true -PASS Boolean false -PASS Array Boolean objects -PASS Object Boolean objects -PASS String empty string -PASS String lone high surrogate -PASS String lone low surrogate -PASS String NUL -PASS String astral character -PASS Array String objects -PASS Object String objects -PASS Number 0.2 -PASS Number 0 -PASS Number -0 -PASS Number NaN -PASS Number Infinity -PASS Number -Infinity -PASS Number 9007199254740992 -PASS Number -9007199254740992 -PASS Number 9007199254740994 -PASS Number -9007199254740994 -PASS BigInt -9007199254740994n -PASS Array Number objects -PASS Object Number objects -PASS Date 0 -PASS Date -0 -PASS Date -8.64e15 -PASS Date 8.64e15 -PASS Array Date objects -PASS Object Date objects -PASS RegExp flags and lastIndex -PASS RegExp sticky flag -PASS RegExp unicode flag -PASS RegExp empty -PASS RegExp slash -PASS RegExp new line -PASS Array RegExp object, RegExp flags and lastIndex -PASS Array RegExp object, RegExp sticky flag -PASS Array RegExp object, RegExp unicode flag -PASS Array RegExp object, RegExp empty -PASS Array RegExp object, RegExp slash -PASS Array RegExp object, RegExp new line -PASS Object RegExp object, RegExp flags and lastIndex -PASS Object RegExp object, RegExp sticky flag -PASS Object RegExp object, RegExp unicode flag -PASS Object RegExp object, RegExp empty -PASS Object RegExp object, RegExp slash -PASS Object RegExp object, RegExp new line -PASS Blob basic -PASS Blob unpaired high surrogate (invalid utf-8) -PASS Blob unpaired low surrogate (invalid utf-8) -PASS Blob paired surrogates (invalid utf-8) -PASS Blob empty -PASS Blob NUL -PASS Array Blob object, Blob basic -PASS Array Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Array Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Array Blob object, Blob paired surrogates (invalid utf-8) -PASS Array Blob object, Blob empty -PASS Array Blob object, Blob NUL -PASS Array Blob object, two Blobs -PASS Object Blob object, Blob basic -PASS Object Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Object Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Object Blob object, Blob paired surrogates (invalid utf-8) -PASS Object Blob object, Blob empty -PASS Object Blob object, Blob NUL -PASS File basic -PASS FileList empty -PASS Array FileList object, FileList empty -PASS Object FileList object, FileList empty -PASS ImageData 1x1 transparent black -PASS ImageData 1x1 non-transparent non-black -PASS Array ImageData object, ImageData 1x1 transparent black -PASS Array ImageData object, ImageData 1x1 non-transparent non-black -PASS Object ImageData object, ImageData 1x1 transparent black -PASS Object ImageData object, ImageData 1x1 non-transparent non-black -PASS Array sparse -PASS Array with non-index property -PASS Object with index property and length -PASS Array with circular reference -PASS Object with circular reference -PASS Array with identical property values -PASS Object with identical property values -PASS Object with property on prototype -PASS Object with non-enumerable property -PASS Object with non-writable property -PASS Object with non-configurable property -PASS ImageBitmap 1x1 transparent black -PASS ImageBitmap 1x1 non-transparent non-black -PASS Array ImageBitmap object, ImageBitmap 1x1 transparent black -PASS Array ImageBitmap object, ImageBitmap 1x1 transparent non-black -PASS Object ImageBitmap object, ImageBitmap 1x1 transparent black -PASS Object ImageBitmap object, ImageBitmap 1x1 transparent non-black -PASS ObjectPrototype must lose its exotic-ness when cloned -PASS Serializing a non-serializable platform object fails -PASS An object whose interface is deleted from the global must still deserialize -PASS A subclass instance will deserialize as its closest serializable superclass -PASS ArrayBuffer -PASS MessagePort -PASS A detached ArrayBuffer cannot be transferred -PASS A detached platform object cannot be transferred -FAIL Transferring a non-transferable platform object fails promise_rejects_dom: function "function() { throw e }" threw object "TypeError: Failed to execute 'postMessage' on 'Worker': Value at index 0 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -PASS An object whose interface is deleted from the global object must still be received -PASS A subclass instance will be received as its closest transferable superclass -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/external/wpt/workers/semantics/structured-clone/shared-expected.txt b/third_party/blink/web_tests/external/wpt/workers/semantics/structured-clone/shared-expected.txt deleted file mode 100644 index d297034dbb3fa9..00000000000000 --- a/third_party/blink/web_tests/external/wpt/workers/semantics/structured-clone/shared-expected.txt +++ /dev/null @@ -1,134 +0,0 @@ -This is a testharness.js-based test. -Found 130 tests; 129 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS primitive undefined -PASS primitive null -PASS primitive true -PASS primitive false -PASS primitive string, empty string -PASS primitive string, lone high surrogate -PASS primitive string, lone low surrogate -PASS primitive string, NUL -PASS primitive string, astral character -PASS primitive number, 0.2 -PASS primitive number, 0 -PASS primitive number, -0 -PASS primitive number, NaN -PASS primitive number, Infinity -PASS primitive number, -Infinity -PASS primitive number, 9007199254740992 -PASS primitive number, -9007199254740992 -PASS primitive number, 9007199254740994 -PASS primitive number, -9007199254740994 -PASS primitive BigInt, 0n -PASS primitive BigInt, -0n -PASS primitive BigInt, -9007199254740994000n -PASS primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n -PASS Array primitives -PASS Object primitives -PASS Boolean true -PASS Boolean false -PASS Array Boolean objects -PASS Object Boolean objects -PASS String empty string -PASS String lone high surrogate -PASS String lone low surrogate -PASS String NUL -PASS String astral character -PASS Array String objects -PASS Object String objects -PASS Number 0.2 -PASS Number 0 -PASS Number -0 -PASS Number NaN -PASS Number Infinity -PASS Number -Infinity -PASS Number 9007199254740992 -PASS Number -9007199254740992 -PASS Number 9007199254740994 -PASS Number -9007199254740994 -PASS BigInt -9007199254740994n -PASS Array Number objects -PASS Object Number objects -PASS Date 0 -PASS Date -0 -PASS Date -8.64e15 -PASS Date 8.64e15 -PASS Array Date objects -PASS Object Date objects -PASS RegExp flags and lastIndex -PASS RegExp sticky flag -PASS RegExp unicode flag -PASS RegExp empty -PASS RegExp slash -PASS RegExp new line -PASS Array RegExp object, RegExp flags and lastIndex -PASS Array RegExp object, RegExp sticky flag -PASS Array RegExp object, RegExp unicode flag -PASS Array RegExp object, RegExp empty -PASS Array RegExp object, RegExp slash -PASS Array RegExp object, RegExp new line -PASS Object RegExp object, RegExp flags and lastIndex -PASS Object RegExp object, RegExp sticky flag -PASS Object RegExp object, RegExp unicode flag -PASS Object RegExp object, RegExp empty -PASS Object RegExp object, RegExp slash -PASS Object RegExp object, RegExp new line -PASS Blob basic -PASS Blob unpaired high surrogate (invalid utf-8) -PASS Blob unpaired low surrogate (invalid utf-8) -PASS Blob paired surrogates (invalid utf-8) -PASS Blob empty -PASS Blob NUL -PASS Array Blob object, Blob basic -PASS Array Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Array Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Array Blob object, Blob paired surrogates (invalid utf-8) -PASS Array Blob object, Blob empty -PASS Array Blob object, Blob NUL -PASS Array Blob object, two Blobs -PASS Object Blob object, Blob basic -PASS Object Blob object, Blob unpaired high surrogate (invalid utf-8) -PASS Object Blob object, Blob unpaired low surrogate (invalid utf-8) -PASS Object Blob object, Blob paired surrogates (invalid utf-8) -PASS Object Blob object, Blob empty -PASS Object Blob object, Blob NUL -PASS File basic -PASS FileList empty -PASS Array FileList object, FileList empty -PASS Object FileList object, FileList empty -PASS ImageData 1x1 transparent black -PASS ImageData 1x1 non-transparent non-black -PASS Array ImageData object, ImageData 1x1 transparent black -PASS Array ImageData object, ImageData 1x1 non-transparent non-black -PASS Object ImageData object, ImageData 1x1 transparent black -PASS Object ImageData object, ImageData 1x1 non-transparent non-black -PASS Array sparse -PASS Array with non-index property -PASS Object with index property and length -PASS Array with circular reference -PASS Object with circular reference -PASS Array with identical property values -PASS Object with identical property values -PASS Object with property on prototype -PASS Object with non-enumerable property -PASS Object with non-writable property -PASS Object with non-configurable property -PASS ImageBitmap 1x1 transparent black -PASS ImageBitmap 1x1 non-transparent non-black -PASS Array ImageBitmap object, ImageBitmap 1x1 transparent black -PASS Array ImageBitmap object, ImageBitmap 1x1 transparent non-black -PASS Object ImageBitmap object, ImageBitmap 1x1 transparent black -PASS Object ImageBitmap object, ImageBitmap 1x1 transparent non-black -PASS ObjectPrototype must lose its exotic-ness when cloned -PASS Serializing a non-serializable platform object fails -PASS An object whose interface is deleted from the global must still deserialize -PASS A subclass instance will deserialize as its closest serializable superclass -PASS ArrayBuffer -PASS MessagePort -PASS A detached ArrayBuffer cannot be transferred -PASS A detached platform object cannot be transferred -FAIL Transferring a non-transferable platform object fails promise_rejects_dom: function "function() { throw e }" threw object "TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type." that is not a DOMException DataCloneError: property "code" is equal to undefined, expected 25 -PASS An object whose interface is deleted from the global object must still be received -PASS A subclass instance will be received as its closest transferable superclass -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/fast/dom/Window/window-postmessage-args-expected.txt b/third_party/blink/web_tests/fast/dom/Window/window-postmessage-args-expected.txt index 50d7c0e4865736..48c4a41dd1ea87 100644 --- a/third_party/blink/web_tests/fast/dom/Window/window-postmessage-args-expected.txt +++ b/third_party/blink/web_tests/fast/dom/Window/window-postmessage-args-expected.txt @@ -24,7 +24,7 @@ PASS view detached PASS Posting message ('[object ArrayBuffer]', ): threw exception DataCloneError: Failed to execute 'postMessage' on 'Window': An ArrayBuffer is detached and could not be cloned. PASS Posting message ('data', [object ArrayBuffer]): threw exception DataCloneError: Failed to execute 'postMessage' on 'Window': ArrayBuffer at index 0 is already detached. PASS Posting message ('[detached TypedArray]', ): threw exception DataCloneError: Failed to execute 'postMessage' on 'Window': An ArrayBuffer is detached and could not be cloned. -PASS Posting message ('data', [detached TypedArray]): threw exception TypeError: Failed to execute 'postMessage' on 'Window': Value at index 0 does not have a transferable type. +PASS Posting message ('data', [detached TypedArray]): threw exception DataCloneError: Failed to execute 'postMessage' on 'Window': Value at index 0 does not have a transferable type. PASS Posting message ('data', [object Object]): threw exception TypeError: Failed to execute 'postMessage' on 'Window': The object must have a callable @@iterator property. PASS Posting message ('data', 1,,2): threw exception TypeError: Failed to execute 'postMessage' on 'Window': Failed to convert value to 'object'. PASS Posting message ('data', ,function postMessage() { [native code] }): threw exception TypeError: Failed to execute 'postMessage' on 'Window': Failed to convert value to 'object'. diff --git a/third_party/blink/web_tests/fast/events/message-port-clone-expected.txt b/third_party/blink/web_tests/fast/events/message-port-clone-expected.txt index b85e8957f15602..ff684978931905 100644 --- a/third_party/blink/web_tests/fast/events/message-port-clone-expected.txt +++ b/third_party/blink/web_tests/fast/events/message-port-clone-expected.txt @@ -8,7 +8,7 @@ PASS channel2.port1.postMessage('msg', [channel.port2]) threw exception DataClon Posting a detached ArrayBuffer should throw. PASS channel.port1.postMessage(arrayBuffer, []) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': An ArrayBuffer is detached and could not be cloned.. Posting a detached ArrayBufferView should throw. -PASS channel.port1.postMessage('msg', [uint16Array]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type.. +PASS channel.port1.postMessage('msg', [uint16Array]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type.. PASS channel.port1.postMessage(uint16Array, []) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': An ArrayBuffer is detached and could not be cloned.. PASS channel.port1.postMessage('msg', [channel2.port1]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 is already neutered.. PASS testEvent.ports.length is 1 diff --git a/third_party/blink/web_tests/fast/events/message-port-clone.html b/third_party/blink/web_tests/fast/events/message-port-clone.html index fc7d7afb81106a..58537b2467bd45 100644 --- a/third_party/blink/web_tests/fast/events/message-port-clone.html +++ b/third_party/blink/web_tests/fast/events/message-port-clone.html @@ -36,7 +36,7 @@ channel = new MessageChannel; var uint16Array = new Uint16Array(10); -shouldThrow("channel.port1.postMessage('msg', [uint16Array])", '"TypeError: Failed to execute \'postMessage\' on \'MessagePort\': Value at index 0 does not have a transferable type."'); +shouldThrow("channel.port1.postMessage('msg', [uint16Array])", '"DataCloneError: Failed to execute \'postMessage\' on \'MessagePort\': Value at index 0 does not have a transferable type."'); channel.port1.postMessage("msg", [uint16Array.buffer]); shouldThrow("channel.port1.postMessage(uint16Array, [])", '"DataCloneError: Failed to execute \'postMessage\' on \'MessagePort\': An ArrayBuffer is detached and could not be cloned."'); diff --git a/third_party/blink/web_tests/fast/events/message-port-multi-expected.txt b/third_party/blink/web_tests/fast/events/message-port-multi-expected.txt index 82c56a05fe0a2b..0fb7bcec253fe7 100644 --- a/third_party/blink/web_tests/fast/events/message-port-multi-expected.txt +++ b/third_party/blink/web_tests/fast/events/message-port-multi-expected.txt @@ -5,9 +5,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE PASS channel.port1.postMessage() threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': 1 argument required, but only 0 present.. PASS channel.port1.postMessage("same port", [channel.port1]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 contains the source port.. PASS channel.port1.postMessage("null port", [channel3.port1, null, channel3.port2]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Failed to convert value to 'object'.. -PASS channel.port1.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 1 does not have a transferable type.. +PASS channel.port1.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Value at index 1 does not have a transferable type.. PASS channel.port1.postMessage("duplicate port", [channel3.port1, channel3.port1]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Message port at index 1 is a duplicate of an earlier port.. -PASS channel.port1.postMessage("notASequence", [{length: 3}]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type.. +PASS channel.port1.postMessage("notASequence", [{length: 3}]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type.. PASS channel.port1.postMessage("duplicate buffer", [arrayBuffer, arrayBuffer]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': ArrayBuffer at index 1 is a duplicate of an earlier ArrayBuffer.. PASS channel.port1.postMessage("largeSequence", largePortArray) threw exception RangeError: Failed to execute 'postMessage' on 'MessagePort': Array length exceeds supported limit.. PASS event.ports is non-null and zero length when no port sent diff --git a/third_party/blink/web_tests/fast/events/resources/message-port-multi.js b/third_party/blink/web_tests/fast/events/resources/message-port-multi.js index 22408dae041419..cc87104f74c83c 100644 --- a/third_party/blink/web_tests/fast/events/resources/message-port-multi.js +++ b/third_party/blink/web_tests/fast/events/resources/message-port-multi.js @@ -21,12 +21,12 @@ shouldThrow('channel.port1.postMessage("same port", [channel.port1])', '"DataClo shouldThrow( 'channel.port1.postMessage("null port", [channel3.port1, null, channel3.port2])', '"TypeError: Failed to execute \'postMessage\' on \'MessagePort\': Failed to convert value to \'object\'."'); -shouldThrow('channel.port1.postMessage("notAPort", [channel3.port1, {}, channel3.port2])', '"TypeError: Failed to execute \'postMessage\' on \'MessagePort\': Value at index 1 does not have a transferable type."'); +shouldThrow('channel.port1.postMessage("notAPort", [channel3.port1, {}, channel3.port2])', '"DataCloneError: Failed to execute \'postMessage\' on \'MessagePort\': Value at index 1 does not have a transferable type."'); shouldThrow('channel.port1.postMessage("duplicate port", [channel3.port1, channel3.port1])', '"DataCloneError: Failed to execute \'postMessage\' on \'MessagePort\': Message port at index 1 is a duplicate of an earlier port."'); // Should be OK to send channel3.port1 (should not have been disentangled by the previous failed calls). channel.port1.postMessage("entangled ports", [channel3.port1, channel3.port2]); -shouldThrow('channel.port1.postMessage("notASequence", [{length: 3}])', '"TypeError: Failed to execute \'postMessage\' on \'MessagePort\': Value at index 0 does not have a transferable type."'); +shouldThrow('channel.port1.postMessage("notASequence", [{length: 3}])', '"DataCloneError: Failed to execute \'postMessage\' on \'MessagePort\': Value at index 0 does not have a transferable type."'); var arrayBuffer = new ArrayBuffer(2); shouldThrow('channel.port1.postMessage("duplicate buffer", [arrayBuffer, arrayBuffer])', '"DataCloneError: Failed to execute \'postMessage\' on \'MessagePort\': ArrayBuffer at index 1 is a duplicate of an earlier ArrayBuffer."'); diff --git a/third_party/blink/web_tests/fast/workers/worker-context-multi-port-expected.txt b/third_party/blink/web_tests/fast/workers/worker-context-multi-port-expected.txt index 8f5f7603ac2dc9..debb4d39908ac2 100644 --- a/third_party/blink/web_tests/fast/workers/worker-context-multi-port-expected.txt +++ b/third_party/blink/web_tests/fast/workers/worker-context-multi-port-expected.txt @@ -10,8 +10,8 @@ PASS event.ports is non-null and zero length when no port sent PASS event.ports is non-null and zero length when empty array sent PASS event.ports contains two ports when two ports sent PASS posting a null port did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Failed to convert value to 'object'. -PASS posting a non-port did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 1 does not have a transferable type. +PASS posting a non-port did throw: DataCloneError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 1 does not have a transferable type. PASS event.ports contains two ports when two ports re-sent after error -PASS posting a non-sequence did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type. +PASS posting a non-sequence did throw: DataCloneError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type. TEST COMPLETE diff --git a/third_party/blink/web_tests/fast/workers/worker-onerror-09-expected.txt b/third_party/blink/web_tests/fast/workers/worker-onerror-09-expected.txt index 33ce92b4f3a029..b0cca4c2642c99 100644 --- a/third_party/blink/web_tests/fast/workers/worker-onerror-09-expected.txt +++ b/third_party/blink/web_tests/fast/workers/worker-onerror-09-expected.txt @@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE Page-level worker.onerror handler triggered: -PASS errorEvent.message is "Uncaught TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type." +PASS errorEvent.message is "Uncaught DataCloneError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type." PASS stripURL(errorEvent.filename) is "[blob: URL]" PASS errorEvent.lineno is 3 PASS errorEvent.colno is 9 diff --git a/third_party/blink/web_tests/fast/workers/worker-onerror-09.html b/third_party/blink/web_tests/fast/workers/worker-onerror-09.html index 16788268ea563e..56cc86e8fbf222 100644 --- a/third_party/blink/web_tests/fast/workers/worker-onerror-09.html +++ b/third_party/blink/web_tests/fast/workers/worker-onerror-09.html @@ -17,7 +17,7 @@ description("This tests that unhandled exceptions in postMessage() are delivered to 'worker.onerror'."); checkErrorEventInHandler({ - message: "Uncaught TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type.", + message: "Uncaught DataCloneError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type.", filename: "[blob: URL]", lineno: 3, colno: 9,