Refresh WritableStream up to spec
https://bugs.webkit.org/show_bug.cgi?id=215267

Reviewed by Geoff Garen.

LayoutTests/imported/w3c:

* web-platform-tests/encoding/streams/realms.window-expected.txt:
* web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any-expected.txt:
* web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any.worker-expected.txt:
* web-platform-tests/streams/idlharness.any-expected.txt:
* web-platform-tests/streams/idlharness.any.worker-expected.txt:
* web-platform-tests/streams/piping/abort.any-expected.txt:
* web-platform-tests/streams/piping/abort.any.worker-expected.txt:
* web-platform-tests/streams/piping/close-propagation-backward.any-expected.txt:
* web-platform-tests/streams/piping/close-propagation-backward.any.worker-expected.txt:
* web-platform-tests/streams/piping/close-propagation-forward.any-expected.txt:
* web-platform-tests/streams/piping/close-propagation-forward.any.worker-expected.txt:
* web-platform-tests/streams/piping/error-propagation-backward.any-expected.txt:
* web-platform-tests/streams/piping/error-propagation-backward.any.worker-expected.txt:
* web-platform-tests/streams/piping/error-propagation-forward.any-expected.txt:
* web-platform-tests/streams/piping/error-propagation-forward.any.worker-expected.txt:
* web-platform-tests/streams/piping/flow-control.any-expected.txt:
* web-platform-tests/streams/piping/flow-control.any.worker-expected.txt:
* web-platform-tests/streams/piping/general.any-expected.txt:
* web-platform-tests/streams/piping/general.any.worker-expected.txt:
* web-platform-tests/streams/piping/multiple-propagation.any-expected.txt:
* web-platform-tests/streams/piping/multiple-propagation.any.worker-expected.txt:
* web-platform-tests/streams/piping/pipe-through.any-expected.txt:
* web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt:
* web-platform-tests/streams/piping/then-interception.any-expected.txt:
* web-platform-tests/streams/piping/then-interception.any.worker-expected.txt:
* web-platform-tests/streams/piping/throwing-options.any-expected.txt:
* web-platform-tests/streams/transform-streams/patched-global.any.worker-expected.txt:
* web-platform-tests/streams/readable-streams/patched-global.any-expected.txt:
* web-platform-tests/streams/readable-streams/patched-global.any.worker-expected.txt:
* web-platform-tests/streams/readable-streams/reentrant-strategies.any-expected.txt:
* web-platform-tests/streams/readable-streams/reentrant-strategies.any.worker-expected.txt:
* web-platform-tests/streams/transform-streams/reentrant-strategies.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/aborting.any-expected.txt:
* web-platform-tests/streams/writable-streams/aborting.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/bad-strategies.any-expected.txt:
* web-platform-tests/streams/writable-streams/bad-strategies.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/bad-underlying-sinks.any-expected.txt:
* web-platform-tests/streams/writable-streams/bad-underlying-sinks.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any-expected.txt:
* web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/close.any-expected.txt:
* web-platform-tests/streams/writable-streams/close.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/constructor.any-expected.txt:
* web-platform-tests/streams/writable-streams/constructor.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/count-queuing-strategy.any-expected.txt:
* web-platform-tests/streams/writable-streams/count-queuing-strategy.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/error.any-expected.txt:
* web-platform-tests/streams/writable-streams/error.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any-expected.txt:
* web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/general.any-expected.txt:
* web-platform-tests/streams/writable-streams/general.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/properties.any-expected.txt:
* web-platform-tests/streams/writable-streams/properties.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/reentrant-strategy.any-expected.txt:
* web-platform-tests/streams/writable-streams/reentrant-strategy.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/start.any-expected.txt:
* web-platform-tests/streams/writable-streams/start.any.js:
* web-platform-tests/streams/writable-streams/start.any.worker-expected.txt:
* web-platform-tests/streams/writable-streams/write.any-expected.txt:
* web-platform-tests/streams/writable-streams/write.any.worker-expected.txt:
* web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt:
* web-platform-tests/workers/semantics/interface-objects/002.worker-expected.txt:

Source/WebCore:

Update according latest spec, including WebIDL, controller and writer.
Covered by rebased tests.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/streams/StreamInternals.js:
* Modules/streams/WritableStream.idl:
* Modules/streams/WritableStream.js:
* Modules/streams/WritableStreamDefaultController.idl: Added.
* Modules/streams/WritableStreamDefaultController.js: Added.
* Modules/streams/WritableStreamDefaultWriter.idl: Added.
* Modules/streams/WritableStreamDefaultWriter.js: Added.
* Modules/streams/WritableStreamInternals.js:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Source/WebKit:

* Shared/WebPreferences.yaml:
Add a dedicated runtime flag, off by default.

Tools:

Put console log in stderr as this makes some tests flaky otherwise.

* DumpRenderTree/TestOptions.cpp:
(shouldDumpJSConsoleLogInStdErr):
* WebKitTestRunner/TestOptions.cpp:
(WTR::shouldDumpJSConsoleLogInStdErr):

LayoutTests:

* js/dom/builtin-getter-name-expected.txt:
* js/dom/builtin-getter-name.html:
* streams/pipe-to-expected.txt:
* streams/reference-implementation/bad-strategies-expected.txt:
* streams/reference-implementation/bad-underlying-sinks-expected.txt:
* streams/reference-implementation/brand-checks-expected.txt:
* streams/reference-implementation/byte-length-queuing-strategy-expected.txt:
* streams/reference-implementation/count-queuing-strategy-expected.txt:
* streams/reference-implementation/pipe-through-expected.txt:
* streams/reference-implementation/pipe-to-expected.txt:
* streams/reference-implementation/pipe-to-options-expected.txt:
* streams/reference-implementation/readable-stream-templated-expected.txt:
* streams/reference-implementation/writable-stream-abort-expected.txt: Removed.
* streams/reference-implementation/writable-stream-abort.html: Removed.
Removed as not up to date.
We should probably do so with all the reference implementation tests.
* streams/reference-implementation/writable-stream-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@265548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6dc0870..f37568c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,28 @@
+2020-08-12  Youenn Fablet  <youenn@apple.com>
+
+        Refresh WritableStream up to spec
+        https://bugs.webkit.org/show_bug.cgi?id=215267
+
+        Reviewed by Geoff Garen.
+
+        * js/dom/builtin-getter-name-expected.txt:
+        * js/dom/builtin-getter-name.html:
+        * streams/pipe-to-expected.txt:
+        * streams/reference-implementation/bad-strategies-expected.txt:
+        * streams/reference-implementation/bad-underlying-sinks-expected.txt:
+        * streams/reference-implementation/brand-checks-expected.txt:
+        * streams/reference-implementation/byte-length-queuing-strategy-expected.txt:
+        * streams/reference-implementation/count-queuing-strategy-expected.txt:
+        * streams/reference-implementation/pipe-through-expected.txt:
+        * streams/reference-implementation/pipe-to-expected.txt:
+        * streams/reference-implementation/pipe-to-options-expected.txt:
+        * streams/reference-implementation/readable-stream-templated-expected.txt:
+        * streams/reference-implementation/writable-stream-abort-expected.txt: Removed.
+        * streams/reference-implementation/writable-stream-abort.html: Removed.
+        Removed as not up to date.
+        We should probably do so with all the reference implementation tests.
+        * streams/reference-implementation/writable-stream-expected.txt:
+
 2020-08-06  Sergio Villar Senin  <svillar@igalia.com>
 
         [WebXR] Update WebXR WPT directory
diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations
index c6f9b91..0bc7eae 100644
--- a/LayoutTests/TestExpectations
+++ b/LayoutTests/TestExpectations
@@ -354,6 +354,9 @@
 imported/w3c/web-platform-tests/server-timing/navigation_timing_idl.html [ Skip ]
 imported/w3c/web-platform-tests/server-timing/navigation_timing_idl.https.html [ Skip ]
 
+# Tests to reenable once pipe algorithm is updated.
+imported/w3c/web-platform-tests/streams/piping [ Skip ]
+
 # Console log lines may appear in a different order so we silence them.
 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html [ DumpJSConsoleLogInStdErr Failure Pass ]
 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html [ DumpJSConsoleLogInStdErr ]
diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog
index 73cf13b..b174c1a 100644
--- a/LayoutTests/imported/w3c/ChangeLog
+++ b/LayoutTests/imported/w3c/ChangeLog
@@ -1,3 +1,74 @@
+2020-08-12  Youenn Fablet  <youenn@apple.com>
+
+        Refresh WritableStream up to spec
+        https://bugs.webkit.org/show_bug.cgi?id=215267
+
+        Reviewed by Geoff Garen.
+
+        * web-platform-tests/encoding/streams/realms.window-expected.txt:
+        * web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any-expected.txt:
+        * web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any.worker-expected.txt:
+        * web-platform-tests/streams/idlharness.any-expected.txt:
+        * web-platform-tests/streams/idlharness.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/abort.any-expected.txt:
+        * web-platform-tests/streams/piping/abort.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/close-propagation-backward.any-expected.txt:
+        * web-platform-tests/streams/piping/close-propagation-backward.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/close-propagation-forward.any-expected.txt:
+        * web-platform-tests/streams/piping/close-propagation-forward.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/error-propagation-backward.any-expected.txt:
+        * web-platform-tests/streams/piping/error-propagation-backward.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/error-propagation-forward.any-expected.txt:
+        * web-platform-tests/streams/piping/error-propagation-forward.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/flow-control.any-expected.txt:
+        * web-platform-tests/streams/piping/flow-control.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/general.any-expected.txt:
+        * web-platform-tests/streams/piping/general.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/multiple-propagation.any-expected.txt:
+        * web-platform-tests/streams/piping/multiple-propagation.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/pipe-through.any-expected.txt:
+        * web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/then-interception.any-expected.txt:
+        * web-platform-tests/streams/piping/then-interception.any.worker-expected.txt:
+        * web-platform-tests/streams/piping/throwing-options.any-expected.txt:
+        * web-platform-tests/streams/transform-streams/patched-global.any.worker-expected.txt:
+        * web-platform-tests/streams/readable-streams/patched-global.any-expected.txt:
+        * web-platform-tests/streams/readable-streams/patched-global.any.worker-expected.txt:
+        * web-platform-tests/streams/readable-streams/reentrant-strategies.any-expected.txt:
+        * web-platform-tests/streams/readable-streams/reentrant-strategies.any.worker-expected.txt:
+        * web-platform-tests/streams/transform-streams/reentrant-strategies.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/aborting.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/aborting.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/bad-strategies.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/bad-strategies.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/bad-underlying-sinks.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/bad-underlying-sinks.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/close.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/close.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/constructor.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/constructor.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/count-queuing-strategy.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/count-queuing-strategy.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/error.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/error.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/general.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/general.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/properties.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/properties.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/reentrant-strategy.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/reentrant-strategy.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/start.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/start.any.js:
+        * web-platform-tests/streams/writable-streams/start.any.worker-expected.txt:
+        * web-platform-tests/streams/writable-streams/write.any-expected.txt:
+        * web-platform-tests/streams/writable-streams/write.any.worker-expected.txt:
+        * web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt:
+        * web-platform-tests/workers/semantics/interface-objects/002.worker-expected.txt:
+
 2020-08-06  Sergio Villar Senin  <svillar@igalia.com>
 
         [WebXR] Update WebXR WPT directory
diff --git a/LayoutTests/imported/w3c/web-platform-tests/encoding/streams/realms.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/encoding/streams/realms.window-expected.txt
index 0f78e76..4545233 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/encoding/streams/realms.window-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/encoding/streams/realms.window-expected.txt
@@ -1,6 +1,42 @@
-CONSOLE MESSAGE: TypeError: new WritableStream().getWriter is not a function. (In 'new WritableStream().getWriter()', 'new WritableStream().getWriter' is undefined)
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'methodRealm.WritableStreamDefaultWriter.prototype')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextEncoderStream()')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextEncoderStream')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextEncoderStream')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId7.writable')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId7.readable')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextEncoderStream')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId15.readable')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId15.writable')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextEncoderStream')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId23.readable')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId23.writable')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextDecoderStream()')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextDecoderStream')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextDecoderStream')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId37.writable')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId37.readable')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextDecoderStream')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId45.readable')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId45.writable')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextDecoderStream')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId53.readable')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId53.writable')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextDecoderStream('utf-8', {fatal: true})')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId61.readable')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId61.writable')
+CONSOLE MESSAGE: TypeError: undefined is not a constructor (evaluating 'new parent.constructorRealm.TextDecoderStream('utf-8', {fatal: true})')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId69.readable')
+CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'window.realmsId69.writable')
 
-Harness Error (FAIL), message = Unhandled rejection: undefined is not an object (evaluating 'methodRealm.WritableStreamDefaultWriter.prototype')
-
+FAIL a TextEncoderStream object should be associated with the realm the constructor came from promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'obj.constructor')"
+FAIL TextEncoderStream's readable and writable attributes should come from the same realm as the constructor definition promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'methodRealm[classname].prototype')"
+FAIL the output chunks when read is called after write should come from the same realm as the constructor of TextEncoderStream promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'result.constructor')"
+FAIL the output chunks when write is called with a pending read should come from the same realm as the constructor of TextEncoderStream promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'result.constructor')"
+FAIL TypeError for unconvertable chunk should come from constructor realm of TextEncoderStream assert_unreached: Should have rejected: write TypeError should come from constructor realm Reached unreachable code
+FAIL a TextDecoderStream object should be associated with the realm the constructor came from promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'obj.constructor')"
+FAIL TextDecoderStream's readable and writable attributes should come from the same realm as the constructor definition promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'methodRealm[classname].prototype')"
+FAIL the result object when read is called after write should come from the same realm as the constructor of TextDecoderStream promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'result.constructor')"
+FAIL the result object when write is called with a pending read should come from the same realm as the constructor of TextDecoderStream promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'result.constructor')"
+FAIL TypeError for chunk with the wrong type should come from constructor realm of TextDecoderStream assert_unreached: Should have rejected: write TypeError should come from constructor realm Reached unreachable code
+FAIL TypeError for invalid chunk should come from constructor realm of TextDecoderStream assert_unreached: Should have rejected: write TypeError should come from constructor realm Reached unreachable code
+FAIL TypeError for incomplete input should come from constructor realm of TextDecoderStream assert_unreached: Should have rejected: close TypeError should come from constructor realm Reached unreachable code
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any-expected.txt
index 125da5c..343ee5d 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any-expected.txt
@@ -1,4 +1,4 @@
 
-PASS using pipeTo on Response body should disturb it synchronously 
-PASS using pipeThrough on Response body should disturb it synchronously 
+FAIL using pipeTo on Response body should disturb it synchronously |this| is not a Promise
+FAIL using pipeThrough on Response body should disturb it synchronously |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any.worker-expected.txt
index 718f975..343ee5d 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-disturbed-by-pipe.any.worker-expected.txt
@@ -1,4 +1,4 @@
 
-FAIL using pipeTo on Response body should disturb it synchronously Can't find variable: WritableStream
-FAIL using pipeThrough on Response body should disturb it synchronously Can't find variable: WritableStream
+FAIL using pipeTo on Response body should disturb it synchronously |this| is not a Promise
+FAIL using pipeThrough on Response body should disturb it synchronously |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any-expected.txt
index b19c19e..62a479c 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any-expected.txt
@@ -125,52 +125,54 @@
 PASS WritableStream interface: existence and properties of interface prototype object 
 PASS WritableStream interface: existence and properties of interface prototype object's "constructor" property 
 PASS WritableStream interface: existence and properties of interface prototype object's @@unscopables property 
-FAIL WritableStream interface: attribute locked assert_true: The prototype object must have a property "locked" expected true got false
+PASS WritableStream interface: attribute locked 
 FAIL WritableStream interface: operation abort(optional any) assert_equals: property has wrong .length expected 0 but got 1
 PASS WritableStream interface: operation close() 
-FAIL WritableStream interface: operation getWriter() assert_own_property: interface prototype object missing non-static operation expected property "getWriter" missing
+PASS WritableStream interface: operation getWriter() 
 PASS WritableStream must be primary interface of new WritableStream() 
 PASS Stringification of new WritableStream() 
-FAIL WritableStream interface: new WritableStream() must inherit property "locked" with the proper type assert_inherits: property "locked" not found in prototype chain
+PASS WritableStream interface: new WritableStream() must inherit property "locked" with the proper type 
 PASS WritableStream interface: new WritableStream() must inherit property "abort(optional any)" with the proper type 
 PASS WritableStream interface: calling abort(optional any) on new WritableStream() with too few arguments must throw TypeError 
 PASS WritableStream interface: new WritableStream() must inherit property "close()" with the proper type 
-FAIL WritableStream interface: new WritableStream() must inherit property "getWriter()" with the proper type assert_inherits: property "getWriter" not found in prototype chain
-FAIL WritableStreamDefaultWriter interface: existence and properties of interface object assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface object length assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface object name assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: existence and properties of interface prototype object assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: attribute closed assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: attribute desiredSize assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: attribute ready assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: operation abort(optional any) assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: operation close() assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: operation releaseLock() assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: operation write(optional any) assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter() assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL Stringification of (new WritableStream()).getWriter() assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "closed" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "desiredSize" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "ready" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "abort(optional any)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultWriter interface: calling abort(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "close()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "releaseLock()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "write(optional any)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultWriter interface: calling write(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "TypeError: (new WritableStream()).getWriter is not a function. (In '(new WritableStream()).getWriter()', '(new WritableStream()).getWriter' is undefined)"
-FAIL WritableStreamDefaultController interface: existence and properties of interface object assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface object length assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface object name assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface: existence and properties of interface prototype object assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface: operation error(optional any) assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController must be primary interface of self.writableStreamDefaultController assert_equals: wrong typeof object expected "object" but got "function"
-FAIL Stringification of self.writableStreamDefaultController assert_equals: wrong typeof object expected "object" but got "function"
-FAIL WritableStreamDefaultController interface: self.writableStreamDefaultController must inherit property "error(optional any)" with the proper type assert_equals: wrong typeof object expected "object" but got "function"
-FAIL WritableStreamDefaultController interface: calling error(optional any) on self.writableStreamDefaultController with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "function"
+PASS WritableStream interface: new WritableStream() must inherit property "getWriter()" with the proper type 
+PASS WritableStreamDefaultWriter interface: existence and properties of interface object 
+PASS WritableStreamDefaultWriter interface object length 
+PASS WritableStreamDefaultWriter interface object name 
+PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object 
+PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's "constructor" property 
+PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property 
+PASS WritableStreamDefaultWriter interface: attribute closed 
+PASS WritableStreamDefaultWriter interface: attribute desiredSize 
+PASS WritableStreamDefaultWriter interface: attribute ready 
+FAIL WritableStreamDefaultWriter interface: operation abort(optional any) assert_equals: property has wrong .length expected 0 but got 1
+PASS WritableStreamDefaultWriter interface: operation close() 
+PASS WritableStreamDefaultWriter interface: operation releaseLock() 
+FAIL WritableStreamDefaultWriter interface: operation write(optional any) assert_equals: property has wrong .length expected 0 but got 1
+PASS WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter() 
+PASS Stringification of (new WritableStream()).getWriter() 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "closed" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "desiredSize" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "ready" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "abort(optional any)" with the proper type 
+PASS WritableStreamDefaultWriter interface: calling abort(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "close()" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "releaseLock()" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "write(optional any)" with the proper type 
+PASS WritableStreamDefaultWriter interface: calling write(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError 
+FAIL WritableStreamDefaultController interface: existence and properties of interface object assert_throws_js: interface object didn't throw TypeError when called as a constructor function "function () {
+                new interface_object();
+            }" did not throw
+PASS WritableStreamDefaultController interface object length 
+PASS WritableStreamDefaultController interface object name 
+PASS WritableStreamDefaultController interface: existence and properties of interface prototype object 
+PASS WritableStreamDefaultController interface: existence and properties of interface prototype object's "constructor" property 
+PASS WritableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property 
+FAIL WritableStreamDefaultController interface: operation error(optional any) assert_equals: property has wrong .length expected 0 but got 1
+PASS WritableStreamDefaultController must be primary interface of self.writableStreamDefaultController 
+PASS Stringification of self.writableStreamDefaultController 
+PASS WritableStreamDefaultController interface: self.writableStreamDefaultController must inherit property "error(optional any)" with the proper type 
+PASS WritableStreamDefaultController interface: calling error(optional any) on self.writableStreamDefaultController with too few arguments must throw TypeError 
 FAIL TransformStream interface: existence and properties of interface object assert_own_property: self does not have own property "TransformStream" expected property "TransformStream" missing
 FAIL TransformStream interface object length assert_own_property: self does not have own property "TransformStream" expected property "TransformStream" missing
 FAIL TransformStream interface object name assert_own_property: self does not have own property "TransformStream" expected property "TransformStream" missing
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any.worker-expected.txt
index e842d78..62a479c 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/idlharness.any.worker-expected.txt
@@ -119,58 +119,60 @@
 }" ("TypeError")
 PASS ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property "respondWithNewView(ArrayBufferView)" with the proper type 
 PASS ReadableStreamBYOBRequest interface: calling respondWithNewView(ArrayBufferView) on self.readableStreamByobRequest with too few arguments must throw TypeError 
-FAIL WritableStream interface: existence and properties of interface object assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream interface object length assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream interface object name assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream interface: existence and properties of interface prototype object assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream interface: attribute locked assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream interface: operation abort(optional any) assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream interface: operation close() assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream interface: operation getWriter() assert_own_property: self does not have own property "WritableStream" expected property "WritableStream" missing
-FAIL WritableStream must be primary interface of new WritableStream() assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL Stringification of new WritableStream() assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStream interface: new WritableStream() must inherit property "locked" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStream interface: new WritableStream() must inherit property "abort(optional any)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStream interface: calling abort(optional any) on new WritableStream() with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStream interface: new WritableStream() must inherit property "close()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStream interface: new WritableStream() must inherit property "getWriter()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: existence and properties of interface object assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface object length assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface object name assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: existence and properties of interface prototype object assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: attribute closed assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: attribute desiredSize assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: attribute ready assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: operation abort(optional any) assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: operation close() assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: operation releaseLock() assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter interface: operation write(optional any) assert_own_property: self does not have own property "WritableStreamDefaultWriter" expected property "WritableStreamDefaultWriter" missing
-FAIL WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter() assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL Stringification of (new WritableStream()).getWriter() assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "closed" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "desiredSize" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "ready" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "abort(optional any)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: calling abort(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "close()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "releaseLock()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "write(optional any)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultWriter interface: calling write(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: WritableStream"
-FAIL WritableStreamDefaultController interface: existence and properties of interface object assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface object length assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface object name assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface: existence and properties of interface prototype object assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController interface: operation error(optional any) assert_own_property: self does not have own property "WritableStreamDefaultController" expected property "WritableStreamDefaultController" missing
-FAIL WritableStreamDefaultController must be primary interface of self.writableStreamDefaultController assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL Stringification of self.writableStreamDefaultController assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL WritableStreamDefaultController interface: self.writableStreamDefaultController must inherit property "error(optional any)" with the proper type assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL WritableStreamDefaultController interface: calling error(optional any) on self.writableStreamDefaultController with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
+PASS WritableStream interface: existence and properties of interface object 
+PASS WritableStream interface object length 
+PASS WritableStream interface object name 
+PASS WritableStream interface: existence and properties of interface prototype object 
+PASS WritableStream interface: existence and properties of interface prototype object's "constructor" property 
+PASS WritableStream interface: existence and properties of interface prototype object's @@unscopables property 
+PASS WritableStream interface: attribute locked 
+FAIL WritableStream interface: operation abort(optional any) assert_equals: property has wrong .length expected 0 but got 1
+PASS WritableStream interface: operation close() 
+PASS WritableStream interface: operation getWriter() 
+PASS WritableStream must be primary interface of new WritableStream() 
+PASS Stringification of new WritableStream() 
+PASS WritableStream interface: new WritableStream() must inherit property "locked" with the proper type 
+PASS WritableStream interface: new WritableStream() must inherit property "abort(optional any)" with the proper type 
+PASS WritableStream interface: calling abort(optional any) on new WritableStream() with too few arguments must throw TypeError 
+PASS WritableStream interface: new WritableStream() must inherit property "close()" with the proper type 
+PASS WritableStream interface: new WritableStream() must inherit property "getWriter()" with the proper type 
+PASS WritableStreamDefaultWriter interface: existence and properties of interface object 
+PASS WritableStreamDefaultWriter interface object length 
+PASS WritableStreamDefaultWriter interface object name 
+PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object 
+PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's "constructor" property 
+PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property 
+PASS WritableStreamDefaultWriter interface: attribute closed 
+PASS WritableStreamDefaultWriter interface: attribute desiredSize 
+PASS WritableStreamDefaultWriter interface: attribute ready 
+FAIL WritableStreamDefaultWriter interface: operation abort(optional any) assert_equals: property has wrong .length expected 0 but got 1
+PASS WritableStreamDefaultWriter interface: operation close() 
+PASS WritableStreamDefaultWriter interface: operation releaseLock() 
+FAIL WritableStreamDefaultWriter interface: operation write(optional any) assert_equals: property has wrong .length expected 0 but got 1
+PASS WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter() 
+PASS Stringification of (new WritableStream()).getWriter() 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "closed" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "desiredSize" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "ready" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "abort(optional any)" with the proper type 
+PASS WritableStreamDefaultWriter interface: calling abort(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "close()" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "releaseLock()" with the proper type 
+PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "write(optional any)" with the proper type 
+PASS WritableStreamDefaultWriter interface: calling write(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError 
+FAIL WritableStreamDefaultController interface: existence and properties of interface object assert_throws_js: interface object didn't throw TypeError when called as a constructor function "function () {
+                new interface_object();
+            }" did not throw
+PASS WritableStreamDefaultController interface object length 
+PASS WritableStreamDefaultController interface object name 
+PASS WritableStreamDefaultController interface: existence and properties of interface prototype object 
+PASS WritableStreamDefaultController interface: existence and properties of interface prototype object's "constructor" property 
+PASS WritableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property 
+FAIL WritableStreamDefaultController interface: operation error(optional any) assert_equals: property has wrong .length expected 0 but got 1
+PASS WritableStreamDefaultController must be primary interface of self.writableStreamDefaultController 
+PASS Stringification of self.writableStreamDefaultController 
+PASS WritableStreamDefaultController interface: self.writableStreamDefaultController must inherit property "error(optional any)" with the proper type 
+PASS WritableStreamDefaultController interface: calling error(optional any) on self.writableStreamDefaultController with too few arguments must throw TypeError 
 FAIL TransformStream interface: existence and properties of interface object assert_own_property: self does not have own property "TransformStream" expected property "TransformStream" missing
 FAIL TransformStream interface object length assert_own_property: self does not have own property "TransformStream" expected property "TransformStream" missing
 FAIL TransformStream interface object name assert_own_property: self does not have own property "TransformStream" expected property "TransformStream" missing
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/abort.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/abort.any-expected.txt
index bdff235..531a169 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/abort.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/abort.any-expected.txt
@@ -1,58 +1,25 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1
-CONSOLE MESSAGE: Unhandled Promise Rejection: failed to abort
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1
 
-Harness Error (FAIL), message = Unhandled rejection: error1
-
-FAIL a signal argument 'null' should cause pipeTo() to reject promise_rejects_js: pipeTo should reject function "function () { throw e }" threw "failed to abort" with type "string", not an object
-FAIL a signal argument 'AbortSignal' should cause pipeTo() to reject promise_rejects_js: pipeTo should reject function "function () { throw e }" threw "failed to abort" with type "string", not an object
-FAIL a signal argument 'true' should cause pipeTo() to reject promise_rejects_js: pipeTo should reject function "function () { throw e }" threw "failed to abort" with type "string", not an object
-FAIL a signal argument '-1' should cause pipeTo() to reject promise_rejects_js: pipeTo should reject function "function () { throw e }" threw "failed to abort" with type "string", not an object
-FAIL a signal argument '[object AbortSignal]' should cause pipeTo() to reject promise_rejects_js: pipeTo should reject function "function () { throw e }" threw "failed to abort" with type "string", not an object
-FAIL an aborted signal should cause the writable stream to reject with an AbortError promise_rejects_dom: pipeTo should reject function "function () { throw e }" threw "failed to abort" with type "string", not an object
-FAIL all the AbortError objects should be the same object promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL preventCancel should prevent canceling the readable promise_rejects_dom: pipeTo should reject function "function () { throw e }" threw "failed to abort" with type "string", not an object
-FAIL preventAbort should prevent aborting the readable promise_rejects_dom: pipeTo should reject function "function () { throw e }" threw "failed to abort" with type "string", not an object
-FAIL preventCancel and preventAbort should prevent canceling the readable and aborting the readable promise_rejects_dom: pipeTo should reject function "function () { throw e }" threw "failed to abort" with type "string", not an object
-FAIL abort should prevent further reads assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
-FAIL all pending writes should complete on abort assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
-FAIL a rejection from underlyingSource.cancel() should be returned by pipeTo() promise_rejects_exactly: pipeTo should reject function "function () { throw e }" threw "failed to abort" but we expected it to throw object "error1: error1"
-FAIL a rejection from underlyingSink.abort() should be returned by pipeTo() promise_rejects_exactly: pipeTo should reject function "function () { throw e }" threw "failed to abort" but we expected it to throw object "error1: error1"
-FAIL a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel() promise_rejects_exactly: pipeTo should reject function "function () { throw e }" threw "failed to abort" but we expected it to throw object "error2: error2"
-FAIL abort signal takes priority over closed readable assert_unreached: Should have rejected: pipeTo should reject Reached unreachable code
-FAIL abort signal takes priority over errored readable promise_rejects_dom: pipeTo should reject function "function () { throw e }" threw object "error1: error1" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
-FAIL abort signal takes priority over closed writable ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL abort signal takes priority over errored writable controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)
-FAIL abort should do nothing after the readable is closed promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL abort should do nothing after the readable is errored promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL abort should do nothing after the readable is errored, even with pending writes promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL abort should do nothing after the writable is errored promise_test: Unhandled rejection with value: object "TypeError: writeController.error is not a function. (In 'writeController.error(error1)', 'writeController.error' is undefined)"
+FAIL a signal argument 'null' should cause pipeTo() to reject |this| is not a Promise
+FAIL a signal argument 'AbortSignal' should cause pipeTo() to reject |this| is not a Promise
+FAIL a signal argument 'true' should cause pipeTo() to reject |this| is not a Promise
+FAIL a signal argument '-1' should cause pipeTo() to reject |this| is not a Promise
+FAIL a signal argument '[object AbortSignal]' should cause pipeTo() to reject |this| is not a Promise
+FAIL an aborted signal should cause the writable stream to reject with an AbortError |this| is not a Promise
+FAIL all the AbortError objects should be the same object |this| is not a Promise
+FAIL preventCancel should prevent canceling the readable |this| is not a Promise
+FAIL preventAbort should prevent aborting the readable |this| is not a Promise
+FAIL preventCancel and preventAbort should prevent canceling the readable and aborting the readable |this| is not a Promise
+FAIL abort should prevent further reads |this| is not a Promise
+FAIL all pending writes should complete on abort |this| is not a Promise
+FAIL a rejection from underlyingSource.cancel() should be returned by pipeTo() |this| is not a Promise
+FAIL a rejection from underlyingSink.abort() should be returned by pipeTo() |this| is not a Promise
+FAIL a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel() |this| is not a Promise
+FAIL abort signal takes priority over closed readable |this| is not a Promise
+FAIL abort signal takes priority over errored readable |this| is not a Promise
+FAIL abort signal takes priority over closed writable promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL abort signal takes priority over errored writable |this| is not a Promise
+FAIL abort should do nothing after the readable is closed |this| is not a Promise
+FAIL abort should do nothing after the readable is errored |this| is not a Promise
+FAIL abort should do nothing after the readable is errored, even with pending writes |this| is not a Promise
+FAIL abort should do nothing after the writable is errored |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/abort.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/abort.any.worker-expected.txt
index 65f76be..531a169 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/abort.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/abort.any.worker-expected.txt
@@ -1,25 +1,25 @@
 
-FAIL a signal argument 'null' should cause pipeTo() to reject Can't find variable: WritableStream
-FAIL a signal argument 'AbortSignal' should cause pipeTo() to reject Can't find variable: WritableStream
-FAIL a signal argument 'true' should cause pipeTo() to reject Can't find variable: WritableStream
-FAIL a signal argument '-1' should cause pipeTo() to reject Can't find variable: WritableStream
-FAIL a signal argument '[object AbortSignal]' should cause pipeTo() to reject Can't find variable: WritableStream
-FAIL an aborted signal should cause the writable stream to reject with an AbortError Can't find variable: WritableStream
-FAIL all the AbortError objects should be the same object Can't find variable: WritableStream
-FAIL preventCancel should prevent canceling the readable Can't find variable: WritableStream
-FAIL preventAbort should prevent aborting the readable Can't find variable: WritableStream
-FAIL preventCancel and preventAbort should prevent canceling the readable and aborting the readable Can't find variable: WritableStream
-FAIL abort should prevent further reads Can't find variable: WritableStream
-FAIL all pending writes should complete on abort Can't find variable: WritableStream
-FAIL a rejection from underlyingSource.cancel() should be returned by pipeTo() Can't find variable: WritableStream
-FAIL a rejection from underlyingSink.abort() should be returned by pipeTo() Can't find variable: WritableStream
-FAIL a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel() Can't find variable: WritableStream
-FAIL abort signal takes priority over closed readable Can't find variable: WritableStream
-FAIL abort signal takes priority over errored readable Can't find variable: WritableStream
-FAIL abort signal takes priority over closed writable Can't find variable: WritableStream
-FAIL abort signal takes priority over errored writable Can't find variable: WritableStream
-FAIL abort should do nothing after the readable is closed Can't find variable: WritableStream
-FAIL abort should do nothing after the readable is errored Can't find variable: WritableStream
-FAIL abort should do nothing after the readable is errored, even with pending writes Can't find variable: WritableStream
-FAIL abort should do nothing after the writable is errored Can't find variable: WritableStream
+FAIL a signal argument 'null' should cause pipeTo() to reject |this| is not a Promise
+FAIL a signal argument 'AbortSignal' should cause pipeTo() to reject |this| is not a Promise
+FAIL a signal argument 'true' should cause pipeTo() to reject |this| is not a Promise
+FAIL a signal argument '-1' should cause pipeTo() to reject |this| is not a Promise
+FAIL a signal argument '[object AbortSignal]' should cause pipeTo() to reject |this| is not a Promise
+FAIL an aborted signal should cause the writable stream to reject with an AbortError |this| is not a Promise
+FAIL all the AbortError objects should be the same object |this| is not a Promise
+FAIL preventCancel should prevent canceling the readable |this| is not a Promise
+FAIL preventAbort should prevent aborting the readable |this| is not a Promise
+FAIL preventCancel and preventAbort should prevent canceling the readable and aborting the readable |this| is not a Promise
+FAIL abort should prevent further reads |this| is not a Promise
+FAIL all pending writes should complete on abort |this| is not a Promise
+FAIL a rejection from underlyingSource.cancel() should be returned by pipeTo() |this| is not a Promise
+FAIL a rejection from underlyingSink.abort() should be returned by pipeTo() |this| is not a Promise
+FAIL a rejection from underlyingSink.abort() should be preferred to one from underlyingSource.cancel() |this| is not a Promise
+FAIL abort signal takes priority over closed readable |this| is not a Promise
+FAIL abort signal takes priority over errored readable |this| is not a Promise
+FAIL abort signal takes priority over closed writable promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL abort signal takes priority over errored writable |this| is not a Promise
+FAIL abort should do nothing after the readable is closed |this| is not a Promise
+FAIL abort should do nothing after the readable is errored |this| is not a Promise
+FAIL abort should do nothing after the readable is errored, even with pending writes |this| is not a Promise
+FAIL abort should do nothing after the writable is errored |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.any-expected.txt
index 6aa9cb4..ff32d89 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.any-expected.txt
@@ -1,18 +1,18 @@
 
-FAIL Closing must be propagated backward: starts closed; preventCancel omitted; fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel omitted; rejected cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = undefined (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = null (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = false (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = 0 (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = -0 (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = NaN (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel =  (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = true (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = a (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = 1 (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = Symbol() (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = [object Object] (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true, preventClose = true ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+FAIL Closing must be propagated backward: starts closed; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel omitted; rejected cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = undefined (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = null (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = false (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = 0 (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = -0 (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = NaN (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel =  (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = true (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = a (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = 1 (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = Symbol() (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = [object Object] (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true, preventClose = true |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.any.worker-expected.txt
index 00081ba..ff32d89 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.any.worker-expected.txt
@@ -1,18 +1,18 @@
 
-FAIL Closing must be propagated backward: starts closed; preventCancel omitted; fulfilled cancel promise Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel omitted; rejected cancel promise Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = undefined (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = null (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = false (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = 0 (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = -0 (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = NaN (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel =  (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = true (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = a (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = 1 (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = Symbol() (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = [object Object] (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true Can't find variable: WritableStream
-FAIL Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true, preventClose = true Can't find variable: WritableStream
+FAIL Closing must be propagated backward: starts closed; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel omitted; rejected cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = undefined (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = null (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = false (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = 0 (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = -0 (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = NaN (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel =  (falsy); fulfilled cancel promise |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = true (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = a (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = 1 (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = Symbol() (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = [object Object] (truthy) |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true |this| is not a Promise
+FAIL Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true, preventClose = true |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.any-expected.txt
index 1df0914..9f14368 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.any-expected.txt
@@ -1,41 +1,32 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
 
-Harness Error (FAIL), message = Unhandled rejection: cancel() called on a reader owned by no readable stream
-
-FAIL Closing must be propagated forward: starts closed; preventClose omitted; fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: starts closed; preventClose omitted; rejected close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: starts closed; preventClose = undefined (falsy); fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: starts closed; preventClose = null (falsy); fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: starts closed; preventClose = false (falsy); fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: starts closed; preventClose = 0 (falsy); fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: starts closed; preventClose = -0 (falsy); fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: starts closed; preventClose = NaN (falsy); fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: starts closed; preventClose =  (falsy); fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-PASS Closing must be propagated forward: starts closed; preventClose = true (truthy) 
-PASS Closing must be propagated forward: starts closed; preventClose = a (truthy) 
-PASS Closing must be propagated forward: starts closed; preventClose = 1 (truthy) 
-PASS Closing must be propagated forward: starts closed; preventClose = Symbol() (truthy) 
-PASS Closing must be propagated forward: starts closed; preventClose = [object Object] (truthy) 
-PASS Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true 
-PASS Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true, preventCancel = true 
-FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; rejected close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-PASS Closing must be propagated forward: becomes closed asynchronously; preventClose = true 
-FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; rejected close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-PASS Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose = true 
-FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; fulfilled close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; rejected close promise promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-PASS Closing must be propagated forward: becomes closed after one chunk; preventClose = true 
-PASS Closing must be propagated forward: shutdown must not occur until the final write completes 
-PASS Closing must be propagated forward: shutdown must not occur until the final write completes; preventClose = true 
-PASS Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write 
-PASS Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write; preventClose = true 
-FAIL Closing must be propagated forward: erroring the writable while flushing pending writes should error pipeTo promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
+FAIL Closing must be propagated forward: starts closed; preventClose omitted; fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose omitted; rejected close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = undefined (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = null (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = false (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = 0 (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = -0 (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = NaN (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose =  (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = true (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = a (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = 1 (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = Symbol() (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = [object Object] (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true, preventCancel = true |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; rejected close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; rejected close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; rejected close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: shutdown must not occur until the final write completes |this| is not a Promise
+FAIL Closing must be propagated forward: shutdown must not occur until the final write completes; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write |this| is not a Promise
+FAIL Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: erroring the writable while flushing pending writes should error pipeTo |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.any.worker-expected.txt
index 757818e..9f14368 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.any.worker-expected.txt
@@ -1,32 +1,32 @@
 
-FAIL Closing must be propagated forward: starts closed; preventClose omitted; fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose omitted; rejected close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = undefined (falsy); fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = null (falsy); fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = false (falsy); fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = 0 (falsy); fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = -0 (falsy); fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = NaN (falsy); fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose =  (falsy); fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = true (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = a (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = 1 (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = Symbol() (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = [object Object] (truthy) Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true Can't find variable: WritableStream
-FAIL Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true, preventCancel = true Can't find variable: WritableStream
-FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; rejected close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose = true Can't find variable: WritableStream
-FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; rejected close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose = true Can't find variable: WritableStream
-FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; fulfilled close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; rejected close promise Can't find variable: WritableStream
-FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose = true Can't find variable: WritableStream
-FAIL Closing must be propagated forward: shutdown must not occur until the final write completes Can't find variable: WritableStream
-FAIL Closing must be propagated forward: shutdown must not occur until the final write completes; preventClose = true Can't find variable: WritableStream
-FAIL Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write Can't find variable: WritableStream
-FAIL Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write; preventClose = true Can't find variable: WritableStream
-FAIL Closing must be propagated forward: erroring the writable while flushing pending writes should error pipeTo Can't find variable: WritableStream
+FAIL Closing must be propagated forward: starts closed; preventClose omitted; fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose omitted; rejected close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = undefined (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = null (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = false (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = 0 (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = -0 (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = NaN (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose =  (falsy); fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = true (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = a (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = 1 (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = Symbol() (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = [object Object] (truthy) |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true |this| is not a Promise
+FAIL Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true, preventCancel = true |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; rejected close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; rejected close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; fulfilled close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; rejected close promise |this| is not a Promise
+FAIL Closing must be propagated forward: becomes closed after one chunk; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: shutdown must not occur until the final write completes |this| is not a Promise
+FAIL Closing must be propagated forward: shutdown must not occur until the final write completes; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write |this| is not a Promise
+FAIL Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write; preventClose = true |this| is not a Promise
+FAIL Closing must be propagated forward: erroring the writable while flushing pending writes should error pipeTo |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.any-expected.txt
index b4672dc..2ff05ca 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.any-expected.txt
@@ -1,41 +1,53 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
 
-Harness Error (FAIL), message = Unhandled rejection: error1!
-
-PASS Errors must be propagated backward: starts errored; preventCancel omitted; fulfilled cancel promise 
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; rejected cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = undefined (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = null (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = false (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 0 (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = -0 (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = NaN (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel =  (falsy); fulfilled cancel promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = a (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 1 (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = Symbol() (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = [object Object] (truthy) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write, preventCancel = true; preventAbort = true ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true, preventAbort = true, preventClose = true ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-PASS Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; fulfilled cancel promise 
-FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; rejected cancel promise promise_rejects_exactly: pipeTo must reject with the cancel error function "function () { throw e }" threw object "error1: error1!" but we expected it to throw object "error2: error2!"
-TIMEOUT Errors must be propagated backward: becomes errored during piping due to write; preventCancel = true Test timed out
-NOTRUN Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; fulfilled cancel promise 
-NOTRUN Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; rejected cancel promise 
-NOTRUN Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = true 
-NOTRUN Errors must be propagated backward: becomes errored after piping; preventCancel omitted; fulfilled cancel promise 
-NOTRUN Errors must be propagated backward: becomes errored after piping; preventCancel omitted; rejected cancel promise 
-NOTRUN Errors must be propagated backward: becomes errored after piping; preventCancel = true 
-NOTRUN Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel omitted (but cancel is never called) 
-NOTRUN Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel = true 
-NOTRUN Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; fulfilled cancel promise 
-NOTRUN Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; rejected cancel promise 
-NOTRUN Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = true 
-NOTRUN Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; fulfilled cancel promise 
-NOTRUN Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; rejected cancel promise 
-NOTRUN Errors must be propagated backward: becomes errored before piping via abort; preventCancel = true 
-NOTRUN Errors must be propagated backward: erroring via the controller errors once pending write completes 
+FAIL Errors must be propagated backward: starts errored; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; rejected cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = undefined (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = null (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = false (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 0 (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = -0 (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = NaN (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel =  (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = a (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 1 (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = Symbol() (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = [object Object] (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write, preventCancel = true; preventAbort = true promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true, preventAbort = true, preventClose = true promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; preventCancel omitted; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel omitted (but cancel is never called) |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored before piping via abort; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: erroring via the controller errors once pending write completes |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.any.worker-expected.txt
index e519d10..329cc47 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.any.worker-expected.txt
@@ -1,37 +1,37 @@
 
-FAIL Errors must be propagated backward: starts errored; preventCancel omitted; fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; rejected cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = undefined (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = null (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = false (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 0 (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = -0 (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = NaN (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel =  (falsy); fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = a (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 1 (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = Symbol() (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = [object Object] (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write, preventCancel = true; preventAbort = true Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true, preventAbort = true, preventClose = true Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; rejected cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel = true Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; rejected cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = true Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored after piping; preventCancel omitted; fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored after piping; preventCancel omitted; rejected cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored after piping; preventCancel = true Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel omitted (but cancel is never called) Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel = true Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; rejected cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = true Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; fulfilled cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; rejected cancel promise Can't find variable: WritableStream
-FAIL Errors must be propagated backward: becomes errored before piping via abort; preventCancel = true Can't find variable: WritableStream
-FAIL Errors must be propagated backward: erroring via the controller errors once pending write completes Can't find variable: WritableStream
+FAIL Errors must be propagated backward: starts errored; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; rejected cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = undefined (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = null (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = false (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 0 (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = -0 (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = NaN (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel =  (falsy); fulfilled cancel promise promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = a (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 1 (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = Symbol() (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = [object Object] (truthy) promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write, preventCancel = true; preventAbort = true promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true, preventAbort = true, preventClose = true promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; preventCancel omitted; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel omitted (but cancel is never called) |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; fulfilled cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; rejected cancel promise |this| is not a Promise
+FAIL Errors must be propagated backward: becomes errored before piping via abort; preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated backward: erroring via the controller errors once pending write completes |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.any-expected.txt
index 0a51d4f..8ba6bd8 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.any-expected.txt
@@ -1,95 +1,51 @@
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
 CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2!
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
 CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
 
-Harness Error (FAIL), message = Unhandled rejection: error1!
-
-PASS Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise 
-FAIL Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise promise_rejects_exactly: pipeTo must reject with the abort error function "function () { throw e }" threw object "error1: error1!" but we expected it to throw object "error2: error2!"
-PASS Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise 
-PASS Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise 
-PASS Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise 
-PASS Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise 
-PASS Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise 
-PASS Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise 
-PASS Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise 
-PASS Errors must be propagated forward: starts errored; preventAbort = true (truthy) 
-PASS Errors must be propagated forward: starts errored; preventAbort = a (truthy) 
-PASS Errors must be propagated forward: starts errored; preventAbort = 1 (truthy) 
-PASS Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy) 
-PASS Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy) 
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true 
-PASS Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true 
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise 
-FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise promise_rejects_exactly: pipeTo must reject with the abort error function "function () { throw e }" threw object "error1: error1!" but we expected it to throw object "error2: error2!"
-PASS Errors must be propagated forward: becomes errored while empty; preventAbort = true 
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise 
-FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise promise_rejects_exactly: pipeTo must reject with the abort error function "function () { throw e }" threw object "error1: error1!" but we expected it to throw object "error2: error2!"
-PASS Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true 
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise 
-FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise promise_rejects_exactly: pipeTo must reject with the abort error function "function () { throw e }" threw object "error1: error1!" but we expected it to throw object "error2: error2!"
-PASS Errors must be propagated forward: becomes errored after one chunk; preventAbort = true 
-FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise assert_array_equals: lengths differ, expected array ["abort", object "error1: error1!"] length 2, got ["write", "Hello", "abort", object "error1: error1!"] length 4
-FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise promise_rejects_exactly: pipeTo must reject with the abort error function "function () { throw e }" threw object "error1: error1!" but we expected it to throw object "error2: error2!"
-FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true assert_array_equals: lengths differ, expected array [] length 0, got ["write", "Hello"] length 2
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes assert_array_equals: lengths differ, expected array ["write", "a"] length 2, got ["write", "a", "abort", object "error1: error1!"] length 4
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true assert_equals: the pipe must not be complete expected false but got true
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write assert_array_equals: the second chunk must have been written, but abort must not have happened yet expected property 2 to be "write" but got "abort" (expected array ["write", "a", "write", "b"] got ["write", "a", "abort", object "error1: error1!"])
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true assert_false: the pipe should not complete while the second write is pending expected false got true
+FAIL Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = true (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = a (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = 1 (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes |this| is not a Promise
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write |this| is not a Promise
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.any.worker-expected.txt
index 3ceee27..90c1fd4 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.any.worker-expected.txt
@@ -1,34 +1,34 @@
 
-FAIL Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = true (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = a (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = 1 (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy) Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true Can't find variable: WritableStream
-FAIL Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = true Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = true Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise Can't find variable: WritableStream
-FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true Can't find variable: WritableStream
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes Can't find variable: WritableStream
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true Can't find variable: WritableStream
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write Can't find variable: WritableStream
-FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true Can't find variable: WritableStream
+FAIL Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = true (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = a (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = 1 (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy) |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true |this| is not a Promise
+FAIL Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise |this| is not a Promise
+FAIL Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes |this| is not a Promise
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true |this| is not a Promise
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write |this| is not a Promise
+FAIL Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.any-expected.txt
index bce5c23..e86f752 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.any-expected.txt
@@ -1,7 +1,14 @@
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: writableStreamDefaultWriterRelease
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: writableStreamDefaultWriterRelease
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: writableStreamDefaultWriterRelease
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: writableStreamDefaultWriterRelease
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: writableStreamDefaultWriterRelease
 
-FAIL Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks promise_test: Unhandled rejection with value: object "TypeError: ws.controller.error is not a function. (In 'ws.controller.error(error1)', 'ws.controller.error' is undefined)"
-FAIL Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks, but then does ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Piping from an empty ReadableStream into a WritableStream that does not desire chunks, but then the readable stream becomes non-empty and the writable stream starts desiring chunks ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Piping from a ReadableStream to a WritableStream that desires more chunks before finishing with previous ones ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Piping to a WritableStream that does not consume the writes fast enough exerts backpressure on the ReadableStream assert_array_equals: at step 4, the desiredSize at the last enqueue (step 3) must have been 0 expected property 1 to be 0 but got 1 (expected array [1, 0] got [1, 1])
+Harness Error (FAIL), message = Unhandled rejection: writableStreamDefaultWriterRelease
+
+FAIL Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks |this| is not a Promise
+FAIL Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks, but then does |this| is not a Promise
+FAIL Piping from an empty ReadableStream into a WritableStream that does not desire chunks, but then the readable stream becomes non-empty and the writable stream starts desiring chunks promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from a ReadableStream to a WritableStream that desires more chunks before finishing with previous ones |this| is not a Promise
+FAIL Piping to a WritableStream that does not consume the writes fast enough exerts backpressure on the ReadableStream promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.any.worker-expected.txt
index 74d2e17..7b49dbd 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.any.worker-expected.txt
@@ -1,7 +1,9 @@
 
-FAIL Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks Can't find variable: WritableStream
-FAIL Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks, but then does Can't find variable: WritableStream
-FAIL Piping from an empty ReadableStream into a WritableStream that does not desire chunks, but then the readable stream becomes non-empty and the writable stream starts desiring chunks Can't find variable: WritableStream
-FAIL Piping from a ReadableStream to a WritableStream that desires more chunks before finishing with previous ones Can't find variable: WritableStream
-FAIL Piping to a WritableStream that does not consume the writes fast enough exerts backpressure on the ReadableStream Can't find variable: WritableStream
+Harness Error (FAIL), message = Unhandled rejection: writableStreamDefaultWriterRelease
+
+FAIL Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks |this| is not a Promise
+FAIL Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks, but then does |this| is not a Promise
+FAIL Piping from an empty ReadableStream into a WritableStream that does not desire chunks, but then the readable stream becomes non-empty and the writable stream starts desiring chunks promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from a ReadableStream to a WritableStream that desires more chunks before finishing with previous ones |this| is not a Promise
+FAIL Piping to a WritableStream that does not consume the writes fast enough exerts backpressure on the ReadableStream promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any-expected.txt
index 22229d5..b30c533 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any-expected.txt
@@ -1,24 +1,17 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: The WritableStream.ready getter can only be used on instances of WritableStream
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
 CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
 CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
 
-Harness Error (FAIL), message = Unhandled rejection: The WritableStream.ready getter can only be used on instances of WritableStream
-
-FAIL Piping must lock both the ReadableStream and WritableStream assert_false: sanity check: the WritableStream must not start locked expected false got undefined
-FAIL Piping finishing must unlock both the ReadableStream and WritableStream assert_false: the WritableStream must become unlocked expected false got undefined
+FAIL Piping must lock both the ReadableStream and WritableStream |this| is not a Promise
+FAIL Piping finishing must unlock both the ReadableStream and WritableStream |this| is not a Promise
 FAIL pipeTo must check the brand of its ReadableStream this value Can only call ReadableStream.getReader on instances of ReadableStream
-PASS pipeTo must check the brand of its WritableStream argument 
-FAIL pipeTo must fail if the ReadableStream is locked, and not lock the WritableStream assert_false: sanity check: the WritableStream does not start locked expected false got undefined
-FAIL pipeTo must fail if the WritableStream is locked, and not lock the ReadableStream ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Piping from a ReadableStream from which lots of chunks are synchronously readable promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-PASS Piping from a ReadableStream for which a chunk becomes asynchronously readable after the pipeTo 
-PASS an undefined rejection from pull should cause pipeTo() to reject when preventAbort is true 
-PASS an undefined rejection from pull should cause pipeTo() to reject when preventAbort is false 
-PASS an undefined rejection from write should cause pipeTo() to reject when preventCancel is true 
-PASS an undefined rejection from write should cause pipeTo() to reject when preventCancel is false 
-FAIL pipeTo() should reject if an option getter grabs a writer ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+FAIL pipeTo must check the brand of its WritableStream argument |this| is not a Promise
+FAIL pipeTo must fail if the ReadableStream is locked, and not lock the WritableStream ReadableStream is locked
+FAIL pipeTo must fail if the WritableStream is locked, and not lock the ReadableStream |this| is not a Promise
+FAIL Piping from a ReadableStream from which lots of chunks are synchronously readable |this| is not a Promise
+FAIL Piping from a ReadableStream for which a chunk becomes asynchronously readable after the pipeTo |this| is not a Promise
+FAIL an undefined rejection from pull should cause pipeTo() to reject when preventAbort is true |this| is not a Promise
+FAIL an undefined rejection from pull should cause pipeTo() to reject when preventAbort is false |this| is not a Promise
+FAIL an undefined rejection from write should cause pipeTo() to reject when preventCancel is true |this| is not a Promise
+FAIL an undefined rejection from write should cause pipeTo() to reject when preventCancel is false |this| is not a Promise
+FAIL pipeTo() should reject if an option getter grabs a writer |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.worker-expected.txt
index ee390bb..f9772ff 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.any.worker-expected.txt
@@ -1,15 +1,15 @@
 
-FAIL Piping must lock both the ReadableStream and WritableStream Can't find variable: WritableStream
-FAIL Piping finishing must unlock both the ReadableStream and WritableStream Can't find variable: WritableStream
-FAIL pipeTo must check the brand of its ReadableStream this value Can't find variable: WritableStream
-FAIL pipeTo must check the brand of its WritableStream argument Can't find variable: WritableStream
-FAIL pipeTo must fail if the ReadableStream is locked, and not lock the WritableStream Can't find variable: WritableStream
-FAIL pipeTo must fail if the WritableStream is locked, and not lock the ReadableStream Can't find variable: WritableStream
-FAIL Piping from a ReadableStream from which lots of chunks are synchronously readable Can't find variable: WritableStream
-FAIL Piping from a ReadableStream for which a chunk becomes asynchronously readable after the pipeTo Can't find variable: WritableStream
-FAIL an undefined rejection from pull should cause pipeTo() to reject when preventAbort is true Can't find variable: WritableStream
-FAIL an undefined rejection from pull should cause pipeTo() to reject when preventAbort is false Can't find variable: WritableStream
-FAIL an undefined rejection from write should cause pipeTo() to reject when preventCancel is true Can't find variable: WritableStream
-FAIL an undefined rejection from write should cause pipeTo() to reject when preventCancel is false Can't find variable: WritableStream
-FAIL pipeTo() should reject if an option getter grabs a writer Can't find variable: WritableStream
+FAIL Piping must lock both the ReadableStream and WritableStream |this| is not a Promise
+FAIL Piping finishing must unlock both the ReadableStream and WritableStream |this| is not a Promise
+FAIL pipeTo must check the brand of its ReadableStream this value Can only call ReadableStream.getReader on instances of ReadableStream
+FAIL pipeTo must check the brand of its WritableStream argument |this| is not a Promise
+FAIL pipeTo must fail if the ReadableStream is locked, and not lock the WritableStream ReadableStream is locked
+FAIL pipeTo must fail if the WritableStream is locked, and not lock the ReadableStream |this| is not a Promise
+FAIL Piping from a ReadableStream from which lots of chunks are synchronously readable |this| is not a Promise
+FAIL Piping from a ReadableStream for which a chunk becomes asynchronously readable after the pipeTo |this| is not a Promise
+FAIL an undefined rejection from pull should cause pipeTo() to reject when preventAbort is true |this| is not a Promise
+FAIL an undefined rejection from pull should cause pipeTo() to reject when preventAbort is false |this| is not a Promise
+FAIL an undefined rejection from write should cause pipeTo() to reject when preventCancel is true |this| is not a Promise
+FAIL an undefined rejection from write should cause pipeTo() to reject when preventCancel is false |this| is not a Promise
+FAIL pipeTo() should reject if an option getter grabs a writer |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.any-expected.txt
index b1e2de2..e3b224b 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.any-expected.txt
@@ -1,11 +1,25 @@
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: writableStreamDefaultWriterRelease
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: writableStreamDefaultWriterRelease
+CONSOLE MESSAGE: Unhandled Promise Rejection: error1: error1!
+CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2!
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: writableStreamDefaultWriterRelease
 
-FAIL Piping from an errored readable stream to an erroring writable stream c.error is not a function. (In 'c.error(error2)', 'c.error' is undefined)
-FAIL Piping from an errored readable stream to an errored writable stream promise_test: Unhandled rejection with value: object "TypeError: c.error is not a function. (In 'c.error(error2)', 'c.error' is undefined)"
-FAIL Piping from an errored readable stream to an erroring writable stream; preventAbort = true c.error is not a function. (In 'c.error(error2)', 'c.error' is undefined)
-FAIL Piping from an errored readable stream to an errored writable stream; preventAbort = true promise_test: Unhandled rejection with value: object "TypeError: c.error is not a function. (In 'c.error(error2)', 'c.error' is undefined)"
-FAIL Piping from an errored readable stream to a closing writable stream ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Piping from an errored readable stream to a closed writable stream ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Piping from a closed readable stream to an erroring writable stream c.error is not a function. (In 'c.error(error1)', 'c.error' is undefined)
-FAIL Piping from a closed readable stream to an errored writable stream promise_test: Unhandled rejection with value: object "TypeError: c.error is not a function. (In 'c.error(error2)', 'c.error' is undefined)"
-FAIL Piping from a closed readable stream to a closed writable stream ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+Harness Error (FAIL), message = Unhandled rejection: writableStreamDefaultWriterRelease
+
+FAIL Piping from an errored readable stream to an erroring writable stream |this| is not a Promise
+FAIL Piping from an errored readable stream to an errored writable stream promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from an errored readable stream to an erroring writable stream; preventAbort = true |this| is not a Promise
+FAIL Piping from an errored readable stream to an errored writable stream; preventAbort = true promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from an errored readable stream to a closing writable stream |this| is not a Promise
+FAIL Piping from an errored readable stream to a closed writable stream promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from a closed readable stream to an erroring writable stream |this| is not a Promise
+FAIL Piping from a closed readable stream to an errored writable stream promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from a closed readable stream to a closed writable stream |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.any.worker-expected.txt
index b7833f2..0f3aac5 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.any.worker-expected.txt
@@ -1,11 +1,13 @@
 
-FAIL Piping from an errored readable stream to an erroring writable stream Can't find variable: WritableStream
-FAIL Piping from an errored readable stream to an errored writable stream promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: WritableStream"
-FAIL Piping from an errored readable stream to an erroring writable stream; preventAbort = true Can't find variable: WritableStream
-FAIL Piping from an errored readable stream to an errored writable stream; preventAbort = true promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: WritableStream"
-FAIL Piping from an errored readable stream to a closing writable stream Can't find variable: WritableStream
-FAIL Piping from an errored readable stream to a closed writable stream Can't find variable: WritableStream
-FAIL Piping from a closed readable stream to an erroring writable stream Can't find variable: WritableStream
-FAIL Piping from a closed readable stream to an errored writable stream promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: WritableStream"
-FAIL Piping from a closed readable stream to a closed writable stream Can't find variable: WritableStream
+Harness Error (FAIL), message = Unhandled rejection: writableStreamDefaultWriterRelease
+
+FAIL Piping from an errored readable stream to an erroring writable stream |this| is not a Promise
+FAIL Piping from an errored readable stream to an errored writable stream promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from an errored readable stream to an erroring writable stream; preventAbort = true |this| is not a Promise
+FAIL Piping from an errored readable stream to an errored writable stream; preventAbort = true promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from an errored readable stream to a closing writable stream |this| is not a Promise
+FAIL Piping from an errored readable stream to a closed writable stream promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from a closed readable stream to an erroring writable stream |this| is not a Promise
+FAIL Piping from a closed readable stream to an errored writable stream promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL Piping from a closed readable stream to a closed writable stream |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any-expected.txt
index 29b34c1..c2823dc 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any-expected.txt
@@ -1,94 +1,43 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: The WritableStream.ready getter can only be used on instances of WritableStream
 CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
 
-Harness Error (FAIL), message = Unhandled rejection
-
-PASS Piping through a duck-typed pass-through transform stream should work 
-FAIL Piping through a transform errored on the writable end does not cause an unhandled promise rejection c.error is not a function. (In 'c.error(new Error('this rejection should not be reported as unhandled'))', 'c.error' is undefined)
-PASS pipeThrough should not call pipeTo on this 
+FAIL Piping through a duck-typed pass-through transform stream should work |this| is not a Promise
+FAIL Piping through a transform errored on the writable end does not cause an unhandled promise rejection |this| is not a Promise
+FAIL pipeThrough should not call pipeTo on this |this| is not a Promise
 FAIL pipeThrough should not call pipeTo on the ReadableStream prototype assert_false: the monkey-patched pipeTo should not have been called expected false got true
 PASS pipeThrough should brand-check this and not allow 'null' 
-FAIL pipeThrough should brand-check readable and not allow 'null' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" did not throw
+FAIL pipeThrough should brand-check readable and not allow 'null' assert_false: writable should not have been accessed expected false got true
 PASS pipeThrough should brand-check this and not allow 'undefined' 
-FAIL pipeThrough should brand-check readable and not allow 'undefined' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" did not throw
+FAIL pipeThrough should brand-check readable and not allow 'undefined' assert_false: writable should not have been accessed expected false got true
 PASS pipeThrough should brand-check this and not allow '0' 
-FAIL pipeThrough should brand-check readable and not allow '0' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" did not throw
+FAIL pipeThrough should brand-check readable and not allow '0' assert_false: writable should not have been accessed expected false got true
 PASS pipeThrough should brand-check this and not allow 'NaN' 
-FAIL pipeThrough should brand-check readable and not allow 'NaN' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" did not throw
+FAIL pipeThrough should brand-check readable and not allow 'NaN' assert_false: writable should not have been accessed expected false got true
 PASS pipeThrough should brand-check this and not allow 'true' 
-FAIL pipeThrough should brand-check readable and not allow 'true' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" did not throw
+FAIL pipeThrough should brand-check readable and not allow 'true' assert_false: writable should not have been accessed expected false got true
 PASS pipeThrough should brand-check this and not allow 'ReadableStream' 
-FAIL pipeThrough should brand-check readable and not allow 'ReadableStream' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" did not throw
+FAIL pipeThrough should brand-check readable and not allow 'ReadableStream' assert_false: writable should not have been accessed expected false got true
 PASS pipeThrough should brand-check this and not allow '[object ReadableStream]' 
-FAIL pipeThrough should brand-check readable and not allow '[object ReadableStream]' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" did not throw
+FAIL pipeThrough should brand-check readable and not allow '[object ReadableStream]' assert_false: writable should not have been accessed expected false got true
 PASS pipeThrough should brand-check writable and not allow 'null' 
 PASS pipeThrough should brand-check writable and not allow 'undefined' 
 PASS pipeThrough should brand-check writable and not allow '0' 
 PASS pipeThrough should brand-check writable and not allow 'NaN' 
 PASS pipeThrough should brand-check writable and not allow 'true' 
 PASS pipeThrough should brand-check writable and not allow 'WritableStream' 
-FAIL pipeThrough should brand-check writable and not allow '[object WritableStream]' assert_throws_js: pipeThrough should brand-check writable function "() => rs.pipeThrough({
-      get readable() {
-        readableGetterCalled = true;
-        return new ReadableStream();
-      },
-      writable
-    })" did not throw
+PASS pipeThrough should brand-check writable and not allow '[object WritableStream]' 
 PASS pipeThrough should rethrow errors from accessing readable or writable 
-FAIL invalid values of signal should throw; specifically 'null' assert_throws_js: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
-FAIL invalid values of signal should throw; specifically '0' assert_throws_js: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
-FAIL invalid values of signal should throw; specifically 'NaN' assert_throws_js: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
-FAIL invalid values of signal should throw; specifically 'true' assert_throws_js: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
-FAIL invalid values of signal should throw; specifically 'AbortSignal' assert_throws_js: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
-FAIL invalid values of signal should throw; specifically '[object AbortSignal]' assert_throws_js: pipeThrough should throw function "() => rs.pipeThrough(uninterestingReadableWritablePair(), { signal })" did not throw
-PASS pipeThrough should accept a real AbortSignal 
+PASS invalid values of signal should throw; specifically 'null' 
+PASS invalid values of signal should throw; specifically '0' 
+PASS invalid values of signal should throw; specifically 'NaN' 
+PASS invalid values of signal should throw; specifically 'true' 
+PASS invalid values of signal should throw; specifically 'AbortSignal' 
+PASS invalid values of signal should throw; specifically '[object AbortSignal]' 
+FAIL pipeThrough should accept a real AbortSignal |this| is not a Promise
 PASS pipeThrough should throw if this is locked 
-FAIL pipeThrough should throw if writable is locked writable.getWriter is not a function. (In 'writable.getWriter()', 'writable.getWriter' is undefined)
-PASS pipeThrough should not care if readable is locked 
-FAIL preventCancel should work controller.error is not a function. (In 'controller.error()', 'controller.error' is undefined)
-PASS preventClose should work 
-PASS preventAbort should work 
+PASS pipeThrough should throw if writable is locked 
+FAIL pipeThrough should not care if readable is locked |this| is not a Promise
+FAIL preventCancel should work |this| is not a Promise
+FAIL preventClose should work |this| is not a Promise
+FAIL preventAbort should work |this| is not a Promise
 PASS pipeThrough() should throw if an option getter grabs a writer 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt
index 9643b1d..bc31b86 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.any.worker-expected.txt
@@ -1,79 +1,42 @@
-CONSOLE MESSAGE: ReferenceError: Can't find variable: WritableStream
 
-Harness Error (FAIL), message = ReferenceError: Can't find variable: WritableStream
-
-FAIL Piping through a duck-typed pass-through transform stream should work Can't find variable: WritableStream
-FAIL Piping through a transform errored on the writable end does not cause an unhandled promise rejection Can't find variable: WritableStream
-FAIL pipeThrough should not call pipeTo on this Can't find variable: WritableStream
-FAIL pipeThrough should not call pipeTo on the ReadableStream prototype Can't find variable: WritableStream
-FAIL pipeThrough should brand-check this and not allow 'null' Can't find variable: WritableStream
-FAIL pipeThrough should brand-check readable and not allow 'null' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL pipeThrough should brand-check this and not allow 'undefined' Can't find variable: WritableStream
-FAIL pipeThrough should brand-check readable and not allow 'undefined' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL pipeThrough should brand-check this and not allow '0' Can't find variable: WritableStream
-FAIL pipeThrough should brand-check readable and not allow '0' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL pipeThrough should brand-check this and not allow 'NaN' Can't find variable: WritableStream
-FAIL pipeThrough should brand-check readable and not allow 'NaN' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL pipeThrough should brand-check this and not allow 'true' Can't find variable: WritableStream
-FAIL pipeThrough should brand-check readable and not allow 'true' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL pipeThrough should brand-check this and not allow 'ReadableStream' Can't find variable: WritableStream
-FAIL pipeThrough should brand-check readable and not allow 'ReadableStream' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL pipeThrough should brand-check this and not allow '[object ReadableStream]' Can't find variable: WritableStream
-FAIL pipeThrough should brand-check readable and not allow '[object ReadableStream]' assert_throws_js: pipeThrough should brand-check readable function "() => rs.pipeThrough({
-        get writable() {
-          writableGetterCalled = true;
-          return new WritableStream();
-        },
-        readable
-      })" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
+FAIL Piping through a duck-typed pass-through transform stream should work |this| is not a Promise
+FAIL Piping through a transform errored on the writable end does not cause an unhandled promise rejection |this| is not a Promise
+FAIL pipeThrough should not call pipeTo on this |this| is not a Promise
+FAIL pipeThrough should not call pipeTo on the ReadableStream prototype assert_false: the monkey-patched pipeTo should not have been called expected false got true
+PASS pipeThrough should brand-check this and not allow 'null' 
+FAIL pipeThrough should brand-check readable and not allow 'null' assert_false: writable should not have been accessed expected false got true
+PASS pipeThrough should brand-check this and not allow 'undefined' 
+FAIL pipeThrough should brand-check readable and not allow 'undefined' assert_false: writable should not have been accessed expected false got true
+PASS pipeThrough should brand-check this and not allow '0' 
+FAIL pipeThrough should brand-check readable and not allow '0' assert_false: writable should not have been accessed expected false got true
+PASS pipeThrough should brand-check this and not allow 'NaN' 
+FAIL pipeThrough should brand-check readable and not allow 'NaN' assert_false: writable should not have been accessed expected false got true
+PASS pipeThrough should brand-check this and not allow 'true' 
+FAIL pipeThrough should brand-check readable and not allow 'true' assert_false: writable should not have been accessed expected false got true
+PASS pipeThrough should brand-check this and not allow 'ReadableStream' 
+FAIL pipeThrough should brand-check readable and not allow 'ReadableStream' assert_false: writable should not have been accessed expected false got true
+PASS pipeThrough should brand-check this and not allow '[object ReadableStream]' 
+FAIL pipeThrough should brand-check readable and not allow '[object ReadableStream]' assert_false: writable should not have been accessed expected false got true
+PASS pipeThrough should brand-check writable and not allow 'null' 
+PASS pipeThrough should brand-check writable and not allow 'undefined' 
+PASS pipeThrough should brand-check writable and not allow '0' 
+PASS pipeThrough should brand-check writable and not allow 'NaN' 
+PASS pipeThrough should brand-check writable and not allow 'true' 
+PASS pipeThrough should brand-check writable and not allow 'WritableStream' 
+PASS pipeThrough should brand-check writable and not allow '[object WritableStream]' 
+PASS pipeThrough should rethrow errors from accessing readable or writable 
+PASS invalid values of signal should throw; specifically 'null' 
+PASS invalid values of signal should throw; specifically '0' 
+PASS invalid values of signal should throw; specifically 'NaN' 
+PASS invalid values of signal should throw; specifically 'true' 
+PASS invalid values of signal should throw; specifically 'AbortSignal' 
+PASS invalid values of signal should throw; specifically '[object AbortSignal]' 
+FAIL pipeThrough should accept a real AbortSignal |this| is not a Promise
+PASS pipeThrough should throw if this is locked 
+PASS pipeThrough should throw if writable is locked 
+FAIL pipeThrough should not care if readable is locked |this| is not a Promise
+FAIL preventCancel should work |this| is not a Promise
+FAIL preventClose should work |this| is not a Promise
+FAIL preventAbort should work |this| is not a Promise
+PASS pipeThrough() should throw if an option getter grabs a writer 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/then-interception.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/then-interception.any.worker-expected.txt
index 2ffff3b..9e1d819 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/then-interception.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/then-interception.any.worker-expected.txt
@@ -1,4 +1,6 @@
 
-FAIL piping should not be observable promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: WritableStream"
-FAIL tee should not be observable promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: WritableStream"
+Harness Error (TIMEOUT), message = null
+
+FAIL piping should not be observable promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
+FAIL tee should not be observable promise_test: Unhandled rejection with value: object "TypeError: |this| is not a Promise"
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/throwing-options.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/throwing-options.any-expected.txt
index 16c5c5a..95ce5a75 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/throwing-options.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/throwing-options.any-expected.txt
@@ -1,6 +1,4 @@
 
-Harness Error (TIMEOUT), message = null
-
 FAIL pipeTo should stop after getting preventAbort throws preventAbort
 FAIL pipeThrough should stop after getting preventAbort throws assert_throws_js: pipeThrough should throw function "() => new ReadableStream().pipeThrough(new TransformStream(), options)" threw object "ReferenceError: Can't find variable: TransformStream" ("ReferenceError") expected instance of function "function Error() {
     [native code]
@@ -13,7 +11,7 @@
 FAIL pipeThrough should stop after getting preventClose throws assert_throws_js: pipeThrough should throw function "() => new ReadableStream().pipeThrough(new TransformStream(), options)" threw object "ReferenceError: Can't find variable: TransformStream" ("ReferenceError") expected instance of function "function Error() {
     [native code]
 }" ("Error")
-TIMEOUT pipeTo should stop after getting signal throws Test timed out
+FAIL pipeTo should stop after getting signal throws |this| is not a Promise
 FAIL pipeThrough should stop after getting signal throws assert_throws_js: pipeThrough should throw function "() => new ReadableStream().pipeThrough(new TransformStream(), options)" threw object "ReferenceError: Can't find variable: TransformStream" ("ReferenceError") expected instance of function "function Error() {
     [native code]
 }" ("Error")
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/throwing-options.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/throwing-options.any.worker-expected.txt
index e05290a..95ce5a75 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/piping/throwing-options.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/piping/throwing-options.any.worker-expected.txt
@@ -1,17 +1,17 @@
 
-FAIL pipeTo should stop after getting preventAbort throws Can't find variable: WritableStream
+FAIL pipeTo should stop after getting preventAbort throws preventAbort
 FAIL pipeThrough should stop after getting preventAbort throws assert_throws_js: pipeThrough should throw function "() => new ReadableStream().pipeThrough(new TransformStream(), options)" threw object "ReferenceError: Can't find variable: TransformStream" ("ReferenceError") expected instance of function "function Error() {
     [native code]
 }" ("Error")
-FAIL pipeTo should stop after getting preventCancel throws Can't find variable: WritableStream
+FAIL pipeTo should stop after getting preventCancel throws preventCancel
 FAIL pipeThrough should stop after getting preventCancel throws assert_throws_js: pipeThrough should throw function "() => new ReadableStream().pipeThrough(new TransformStream(), options)" threw object "ReferenceError: Can't find variable: TransformStream" ("ReferenceError") expected instance of function "function Error() {
     [native code]
 }" ("Error")
-FAIL pipeTo should stop after getting preventClose throws Can't find variable: WritableStream
+FAIL pipeTo should stop after getting preventClose throws preventClose
 FAIL pipeThrough should stop after getting preventClose throws assert_throws_js: pipeThrough should throw function "() => new ReadableStream().pipeThrough(new TransformStream(), options)" threw object "ReferenceError: Can't find variable: TransformStream" ("ReferenceError") expected instance of function "function Error() {
     [native code]
 }" ("Error")
-FAIL pipeTo should stop after getting signal throws Can't find variable: WritableStream
+FAIL pipeTo should stop after getting signal throws |this| is not a Promise
 FAIL pipeThrough should stop after getting signal throws assert_throws_js: pipeThrough should throw function "() => new ReadableStream().pipeThrough(new TransformStream(), options)" threw object "ReferenceError: Can't find variable: TransformStream" ("ReferenceError") expected instance of function "function Error() {
     [native code]
 }" ("Error")
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/patched-global.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/patched-global.any-expected.txt
index df07562..94defd4 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/patched-global.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/patched-global.any-expected.txt
@@ -3,5 +3,5 @@
 PASS ReadableStream tee() should not call the global ReadableStream 
 FAIL ReadableStream async iterator should use the original values of getReader() and ReadableStreamDefaultReader methods promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...chunk of rs...')"
 PASS tee() should not call Promise.prototype.then() 
-PASS pipeTo() should not call Promise.prototype.then() 
+FAIL pipeTo() should not call Promise.prototype.then() |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/patched-global.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/patched-global.any.worker-expected.txt
index bec8b07..94defd4 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/patched-global.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/patched-global.any.worker-expected.txt
@@ -3,5 +3,5 @@
 PASS ReadableStream tee() should not call the global ReadableStream 
 FAIL ReadableStream async iterator should use the original values of getReader() and ReadableStreamDefaultReader methods promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...chunk of rs...')"
 PASS tee() should not call Promise.prototype.then() 
-FAIL pipeTo() should not call Promise.prototype.then() Can't find variable: WritableStream
+FAIL pipeTo() should not call Promise.prototype.then() |this| is not a Promise
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/reentrant-strategies.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/reentrant-strategies.any-expected.txt
index 1fa4220..8371ccc 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/reentrant-strategies.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/reentrant-strategies.any-expected.txt
@@ -1,3 +1,6 @@
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: |this| is not a Promise
+
+Harness Error (FAIL), message = Unhandled rejection: |this| is not a Promise
 
 PASS enqueue() inside size() should work 
 PASS close() inside size() should not crash 
@@ -5,7 +8,7 @@
 PASS error() inside size() should work 
 PASS desiredSize inside size() should work 
 PASS cancel() inside size() should work 
-PASS pipeTo() inside size() should behave as expected 
+FAIL pipeTo() inside size() should behave as expected |this| is not a Promise
 PASS read() inside of size() should behave as expected 
 PASS getReader() inside size() should work 
 PASS tee() inside size() should work 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/reentrant-strategies.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/reentrant-strategies.any.worker-expected.txt
index 864e81a..2406b25 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/reentrant-strategies.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/reentrant-strategies.any.worker-expected.txt
@@ -1,11 +1,13 @@
 
+Harness Error (FAIL), message = Unhandled rejection: |this| is not a Promise
+
 PASS enqueue() inside size() should work 
 PASS close() inside size() should not crash 
 PASS close request inside size() should work 
 PASS error() inside size() should work 
 PASS desiredSize inside size() should work 
 PASS cancel() inside size() should work 
-FAIL pipeTo() inside size() should behave as expected Can't find variable: WritableStream
+FAIL pipeTo() inside size() should behave as expected |this| is not a Promise
 PASS read() inside of size() should behave as expected 
 PASS getReader() inside size() should work 
 PASS tee() inside size() should work 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/reentrant-strategies.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/reentrant-strategies.any.worker-expected.txt
index 72b71e4..2b59317 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/reentrant-strategies.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/transform-streams/reentrant-strategies.any.worker-expected.txt
@@ -4,7 +4,7 @@
 FAIL error() inside size() should work Can't find variable: TransformStream
 FAIL desiredSize inside size() should work Can't find variable: TransformStream
 FAIL readable cancel() inside size() should work Can't find variable: TransformStream
-FAIL pipeTo() inside size() should work Can't find variable: WritableStream
+FAIL pipeTo() inside size() should work Can't find variable: TransformStream
 FAIL read() inside of size() should work Can't find variable: TransformStream
 FAIL writer.write() inside size() should work Can't find variable: TransformStream
 FAIL synchronous writer.write() inside size() should work Can't find variable: TransformStream
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/aborting.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/aborting.any-expected.txt
index fa5ce50..720fe87 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/aborting.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/aborting.any-expected.txt
@@ -1,70 +1,65 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: done
-CONSOLE MESSAGE: Unhandled Promise Rejection: done
-CONSOLE MESSAGE: Unhandled Promise Rejection: done
-CONSOLE MESSAGE: Unhandled Promise Rejection: error2: error2
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: string argument
 
 Harness Error (FAIL), message = Unhandled rejection
 
-FAIL Aborting a WritableStream before it starts should cause the writer's unsettled ready promise to reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Aborting a WritableStream should cause the writer's fulfilled ready promise to reset to a rejected one ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL abort() on a released writer rejects ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Aborting a WritableStream immediately prevents future writes promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Aborting a WritableStream prevents further writes after any that are in progress promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL Fulfillment value of writer.abort() call must be undefined even if the underlying sink returns a non-undefined value ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL WritableStream if sink's abort throws, the promise returned by writer.abort() rejects ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL WritableStream if sink's abort throws, the promise returned by multiple writer.abort()s is the same and rejects ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS Aborting a WritableStream before it starts should cause the writer's unsettled ready promise to reject 
+FAIL Aborting a WritableStream should cause the writer's fulfilled ready promise to reset to a rejected one assert_not_equals: the ready promise property should change got disallowed value object "[object Promise]"
+PASS abort() on a released writer rejects 
+PASS Aborting a WritableStream immediately prevents future writes 
+PASS Aborting a WritableStream prevents further writes after any that are in progress 
+PASS Fulfillment value of writer.abort() call must be undefined even if the underlying sink returns a non-undefined value 
+PASS WritableStream if sink's abort throws, the promise returned by writer.abort() rejects 
+PASS WritableStream if sink's abort throws, the promise returned by multiple writer.abort()s is the same and rejects 
 PASS WritableStream if sink's abort throws, the promise returned by ws.abort() rejects 
-FAIL WritableStream if sink's abort throws, for an abort performed during a write, the promise returned by ws.abort() rejects ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Aborting a WritableStream passes through the given reason ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Aborting a WritableStream puts it in an errored state with the error passed to abort() ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Aborting a WritableStream causes any outstanding write() promises to be rejected with the reason supplied ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing but then immediately aborting a WritableStream causes the stream to error ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Closing a WritableStream and aborting it while it closes causes the stream to ignore the abort attempt ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Aborting a WritableStream after it is closed is a no-op ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL WritableStream should NOT call underlying sink's close if no abort is supplied (historical) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL returning a thenable from abort() should work ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL .closed should not resolve before fulfilled write() ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL .closed should not resolve before rejected write(); write() error should not overwrite abort() error ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL writes should be satisfied in order when aborting ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL writes should be satisfied in order after rejected write when aborting ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL close() should reject with abort reason why abort() is first error ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL underlying abort() should not be called until underlying write() completes ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL underlying abort() should not be called if underlying close() has started ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL if underlying close() has started and then rejects, the abort() and close() promises should reject with the underlying close rejection reason ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL an abort() that happens during a write() should trigger the underlying abort() even with a close() queued ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL if a writer is created for a stream with a pending abort, its ready should be rejected with the abort error ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL writer close() promise should resolve before abort() promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL writer.ready should reject on controller error without waiting for underlying write ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL writer.abort() while there is an in-flight write, and then finish the write with rejection ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL writer.abort(), controller.error() while there is an in-flight write, and then finish the write ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL writer.abort(), controller.error() while there is an in-flight close, and then finish the close ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL controller.error(), writer.abort() while there is an in-flight write, and then finish the write ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL controller.error(), writer.abort() while there is an in-flight close, and then finish the close ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL releaseLock() while aborting should reject the original closed promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL releaseLock() during delayed async abort() should reject the writer.closed promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL sink abort() should not be called until sink start() is done assert_array_equals: abort() should not be called during start() lengths differ, expected array [] length 0, got ["abort", "done"] length 2
-FAIL if start attempts to error the controller after abort() has been called, then it should lose controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)
+PASS WritableStream if sink's abort throws, for an abort performed during a write, the promise returned by ws.abort() rejects 
+PASS Aborting a WritableStream passes through the given reason 
+FAIL Aborting a WritableStream puts it in an errored state with the error passed to abort() assert_unreached: Should have rejected: ready should reject with error1 Reached unreachable code
+PASS Aborting a WritableStream causes any outstanding write() promises to be rejected with the reason supplied 
+PASS Closing but then immediately aborting a WritableStream causes the stream to error 
+PASS Closing a WritableStream and aborting it while it closes causes the stream to ignore the abort attempt 
+PASS Aborting a WritableStream after it is closed is a no-op 
+PASS WritableStream should NOT call underlying sink's close if no abort is supplied (historical) 
+PASS returning a thenable from abort() should work 
+PASS .closed should not resolve before fulfilled write() 
+PASS .closed should not resolve before rejected write(); write() error should not overwrite abort() error 
+PASS writes should be satisfied in order when aborting 
+PASS writes should be satisfied in order after rejected write when aborting 
+PASS close() should reject with abort reason why abort() is first error 
+PASS underlying abort() should not be called until underlying write() completes 
+PASS underlying abort() should not be called if underlying close() has started 
+PASS if underlying close() has started and then rejects, the abort() and close() promises should reject with the underlying close rejection reason 
+PASS an abort() that happens during a write() should trigger the underlying abort() even with a close() queued 
+PASS if a writer is created for a stream with a pending abort, its ready should be rejected with the abort error 
+PASS writer close() promise should resolve before abort() promise 
+PASS writer.ready should reject on controller error without waiting for underlying write 
+FAIL writer.abort() while there is an in-flight write, and then finish the write with rejection promise_rejects_js: writer.ready must be rejected with an error indicating release function "function () { throw e }" threw object "error1: error1" ("error1") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL writer.abort(), controller.error() while there is an in-flight write, and then finish the write promise_rejects_js: writer.ready must be rejected with an error indicating release function "function () { throw e }" threw object "error1: error1" ("error1") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL writer.abort(), controller.error() while there is an in-flight close, and then finish the close assert_unreached: Should have rejected: writer.ready must reject with the error from abort Reached unreachable code
+FAIL controller.error(), writer.abort() while there is an in-flight write, and then finish the write promise_rejects_js: writer.ready must be rejected with an error indicating release function "function () { throw e }" threw object "error2: error2" ("error2") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL controller.error(), writer.abort() while there is an in-flight close, and then finish the close assert_unreached: Should have rejected: writer.ready must reject with the error passed to the controller's error method Reached unreachable code
+PASS releaseLock() while aborting should reject the original closed promise 
+PASS releaseLock() during delayed async abort() should reject the writer.closed promise 
+PASS sink abort() should not be called until sink start() is done 
+PASS if start attempts to error the controller after abort() has been called, then it should lose 
 PASS stream abort() promise should still resolve if sink start() rejects 
-FAIL writer abort() during sink start() should replace the writer.ready promise synchronously ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL promises returned from other writer methods should be rejected when writer abort() happens during sink start() ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL abort() should succeed despite rejection from write ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL abort() should be rejected with the rejection returned from close() ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL a rejecting sink.write() should not prevent sink.abort() from being called ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+FAIL writer abort() during sink start() should replace the writer.ready promise synchronously assert_not_equals: abort() should replace the ready promise with a rejected one got disallowed value object "[object Promise]"
+PASS promises returned from other writer methods should be rejected when writer abort() happens during sink start() 
+PASS abort() should succeed despite rejection from write 
+PASS abort() should be rejected with the rejection returned from close() 
+PASS a rejecting sink.write() should not prevent sink.abort() from being called 
 PASS when start errors after stream abort(), underlying sink abort() should be called anyway 
-FAIL when calling abort() twice on the same stream, both should give the same promise that fulfills with undefined assert_equals: the promises must be the same expected object "[object Promise]" but got object "[object Promise]"
-FAIL when calling abort() twice on the same stream, but sequentially so so there's no pending abort the second time, both should fulfill with undefined promise_test: Unhandled rejection with value: undefined
-FAIL calling abort() on an errored stream should fulfill with undefined c.error is not a function. (In 'c.error(error1)', 'c.error' is undefined)
-FAIL sink abort() should not be called if stream was erroring due to controller.error() before abort() was called ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL sink abort() should not be called if stream was erroring due to bad strategy before abort() was called ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL abort with no arguments should set the stored error to undefined promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL abort with an undefined argument should set the stored error to undefined promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL abort with a string argument should set the stored error to that argument promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL abort on a locked stream should reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS when calling abort() twice on the same stream, both should give the same promise that fulfills with undefined 
+PASS when calling abort() twice on the same stream, but sequentially so so there's no pending abort the second time, both should fulfill with undefined 
+PASS calling abort() on an errored stream should fulfill with undefined 
+PASS sink abort() should not be called if stream was erroring due to controller.error() before abort() was called 
+PASS sink abort() should not be called if stream was erroring due to bad strategy before abort() was called 
+PASS abort with no arguments should set the stored error to undefined 
+PASS abort with an undefined argument should set the stored error to undefined 
+PASS abort with a string argument should set the stored error to that argument 
+PASS abort on a locked stream should reject 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/aborting.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/aborting.any.worker-expected.txt
index 0642bdc..720fe87 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/aborting.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/aborting.any.worker-expected.txt
@@ -1,57 +1,65 @@
 
-FAIL Aborting a WritableStream before it starts should cause the writer's unsettled ready promise to reject Can't find variable: WritableStream
-FAIL Aborting a WritableStream should cause the writer's fulfilled ready promise to reset to a rejected one Can't find variable: WritableStream
-FAIL abort() on a released writer rejects Can't find variable: WritableStream
-FAIL Aborting a WritableStream immediately prevents future writes Can't find variable: WritableStream
-FAIL Aborting a WritableStream prevents further writes after any that are in progress Can't find variable: WritableStream
-FAIL Fulfillment value of writer.abort() call must be undefined even if the underlying sink returns a non-undefined value Can't find variable: WritableStream
-FAIL WritableStream if sink's abort throws, the promise returned by writer.abort() rejects Can't find variable: WritableStream
-FAIL WritableStream if sink's abort throws, the promise returned by multiple writer.abort()s is the same and rejects Can't find variable: WritableStream
-FAIL WritableStream if sink's abort throws, the promise returned by ws.abort() rejects Can't find variable: WritableStream
-FAIL WritableStream if sink's abort throws, for an abort performed during a write, the promise returned by ws.abort() rejects Can't find variable: WritableStream
-FAIL Aborting a WritableStream passes through the given reason Can't find variable: WritableStream
-FAIL Aborting a WritableStream puts it in an errored state with the error passed to abort() Can't find variable: WritableStream
-FAIL Aborting a WritableStream causes any outstanding write() promises to be rejected with the reason supplied Can't find variable: WritableStream
-FAIL Closing but then immediately aborting a WritableStream causes the stream to error Can't find variable: WritableStream
-FAIL Closing a WritableStream and aborting it while it closes causes the stream to ignore the abort attempt Can't find variable: WritableStream
-FAIL Aborting a WritableStream after it is closed is a no-op Can't find variable: WritableStream
-FAIL WritableStream should NOT call underlying sink's close if no abort is supplied (historical) Can't find variable: WritableStream
-FAIL returning a thenable from abort() should work Can't find variable: WritableStream
-FAIL .closed should not resolve before fulfilled write() Can't find variable: WritableStream
-FAIL .closed should not resolve before rejected write(); write() error should not overwrite abort() error Can't find variable: WritableStream
-FAIL writes should be satisfied in order when aborting Can't find variable: WritableStream
-FAIL writes should be satisfied in order after rejected write when aborting Can't find variable: WritableStream
-FAIL close() should reject with abort reason why abort() is first error Can't find variable: WritableStream
-FAIL underlying abort() should not be called until underlying write() completes Can't find variable: WritableStream
-FAIL underlying abort() should not be called if underlying close() has started Can't find variable: WritableStream
-FAIL if underlying close() has started and then rejects, the abort() and close() promises should reject with the underlying close rejection reason Can't find variable: WritableStream
-FAIL an abort() that happens during a write() should trigger the underlying abort() even with a close() queued Can't find variable: WritableStream
-FAIL if a writer is created for a stream with a pending abort, its ready should be rejected with the abort error Can't find variable: WritableStream
-FAIL writer close() promise should resolve before abort() promise Can't find variable: WritableStream
-FAIL writer.ready should reject on controller error without waiting for underlying write Can't find variable: WritableStream
-FAIL writer.abort() while there is an in-flight write, and then finish the write with rejection Can't find variable: WritableStream
-FAIL writer.abort(), controller.error() while there is an in-flight write, and then finish the write Can't find variable: WritableStream
-FAIL writer.abort(), controller.error() while there is an in-flight close, and then finish the close Can't find variable: WritableStream
-FAIL controller.error(), writer.abort() while there is an in-flight write, and then finish the write Can't find variable: WritableStream
-FAIL controller.error(), writer.abort() while there is an in-flight close, and then finish the close Can't find variable: WritableStream
-FAIL releaseLock() while aborting should reject the original closed promise Can't find variable: WritableStream
-FAIL releaseLock() during delayed async abort() should reject the writer.closed promise Can't find variable: WritableStream
-FAIL sink abort() should not be called until sink start() is done Can't find variable: WritableStream
-FAIL if start attempts to error the controller after abort() has been called, then it should lose Can't find variable: WritableStream
-FAIL stream abort() promise should still resolve if sink start() rejects Can't find variable: WritableStream
-FAIL writer abort() during sink start() should replace the writer.ready promise synchronously Can't find variable: WritableStream
-FAIL promises returned from other writer methods should be rejected when writer abort() happens during sink start() Can't find variable: WritableStream
-FAIL abort() should succeed despite rejection from write Can't find variable: WritableStream
-FAIL abort() should be rejected with the rejection returned from close() Can't find variable: WritableStream
-FAIL a rejecting sink.write() should not prevent sink.abort() from being called Can't find variable: WritableStream
-FAIL when start errors after stream abort(), underlying sink abort() should be called anyway Can't find variable: WritableStream
-FAIL when calling abort() twice on the same stream, both should give the same promise that fulfills with undefined Can't find variable: WritableStream
-FAIL when calling abort() twice on the same stream, but sequentially so so there's no pending abort the second time, both should fulfill with undefined Can't find variable: WritableStream
-FAIL calling abort() on an errored stream should fulfill with undefined Can't find variable: WritableStream
-FAIL sink abort() should not be called if stream was erroring due to controller.error() before abort() was called Can't find variable: WritableStream
-FAIL sink abort() should not be called if stream was erroring due to bad strategy before abort() was called Can't find variable: WritableStream
-FAIL abort with no arguments should set the stored error to undefined Can't find variable: WritableStream
-FAIL abort with an undefined argument should set the stored error to undefined Can't find variable: WritableStream
-FAIL abort with a string argument should set the stored error to that argument Can't find variable: WritableStream
-FAIL abort on a locked stream should reject Can't find variable: WritableStream
+Harness Error (FAIL), message = Unhandled rejection
+
+PASS Aborting a WritableStream before it starts should cause the writer's unsettled ready promise to reject 
+FAIL Aborting a WritableStream should cause the writer's fulfilled ready promise to reset to a rejected one assert_not_equals: the ready promise property should change got disallowed value object "[object Promise]"
+PASS abort() on a released writer rejects 
+PASS Aborting a WritableStream immediately prevents future writes 
+PASS Aborting a WritableStream prevents further writes after any that are in progress 
+PASS Fulfillment value of writer.abort() call must be undefined even if the underlying sink returns a non-undefined value 
+PASS WritableStream if sink's abort throws, the promise returned by writer.abort() rejects 
+PASS WritableStream if sink's abort throws, the promise returned by multiple writer.abort()s is the same and rejects 
+PASS WritableStream if sink's abort throws, the promise returned by ws.abort() rejects 
+PASS WritableStream if sink's abort throws, for an abort performed during a write, the promise returned by ws.abort() rejects 
+PASS Aborting a WritableStream passes through the given reason 
+FAIL Aborting a WritableStream puts it in an errored state with the error passed to abort() assert_unreached: Should have rejected: ready should reject with error1 Reached unreachable code
+PASS Aborting a WritableStream causes any outstanding write() promises to be rejected with the reason supplied 
+PASS Closing but then immediately aborting a WritableStream causes the stream to error 
+PASS Closing a WritableStream and aborting it while it closes causes the stream to ignore the abort attempt 
+PASS Aborting a WritableStream after it is closed is a no-op 
+PASS WritableStream should NOT call underlying sink's close if no abort is supplied (historical) 
+PASS returning a thenable from abort() should work 
+PASS .closed should not resolve before fulfilled write() 
+PASS .closed should not resolve before rejected write(); write() error should not overwrite abort() error 
+PASS writes should be satisfied in order when aborting 
+PASS writes should be satisfied in order after rejected write when aborting 
+PASS close() should reject with abort reason why abort() is first error 
+PASS underlying abort() should not be called until underlying write() completes 
+PASS underlying abort() should not be called if underlying close() has started 
+PASS if underlying close() has started and then rejects, the abort() and close() promises should reject with the underlying close rejection reason 
+PASS an abort() that happens during a write() should trigger the underlying abort() even with a close() queued 
+PASS if a writer is created for a stream with a pending abort, its ready should be rejected with the abort error 
+PASS writer close() promise should resolve before abort() promise 
+PASS writer.ready should reject on controller error without waiting for underlying write 
+FAIL writer.abort() while there is an in-flight write, and then finish the write with rejection promise_rejects_js: writer.ready must be rejected with an error indicating release function "function () { throw e }" threw object "error1: error1" ("error1") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL writer.abort(), controller.error() while there is an in-flight write, and then finish the write promise_rejects_js: writer.ready must be rejected with an error indicating release function "function () { throw e }" threw object "error1: error1" ("error1") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL writer.abort(), controller.error() while there is an in-flight close, and then finish the close assert_unreached: Should have rejected: writer.ready must reject with the error from abort Reached unreachable code
+FAIL controller.error(), writer.abort() while there is an in-flight write, and then finish the write promise_rejects_js: writer.ready must be rejected with an error indicating release function "function () { throw e }" threw object "error2: error2" ("error2") expected instance of function "function TypeError() {
+    [native code]
+}" ("TypeError")
+FAIL controller.error(), writer.abort() while there is an in-flight close, and then finish the close assert_unreached: Should have rejected: writer.ready must reject with the error passed to the controller's error method Reached unreachable code
+PASS releaseLock() while aborting should reject the original closed promise 
+PASS releaseLock() during delayed async abort() should reject the writer.closed promise 
+PASS sink abort() should not be called until sink start() is done 
+PASS if start attempts to error the controller after abort() has been called, then it should lose 
+PASS stream abort() promise should still resolve if sink start() rejects 
+FAIL writer abort() during sink start() should replace the writer.ready promise synchronously assert_not_equals: abort() should replace the ready promise with a rejected one got disallowed value object "[object Promise]"
+PASS promises returned from other writer methods should be rejected when writer abort() happens during sink start() 
+PASS abort() should succeed despite rejection from write 
+PASS abort() should be rejected with the rejection returned from close() 
+PASS a rejecting sink.write() should not prevent sink.abort() from being called 
+PASS when start errors after stream abort(), underlying sink abort() should be called anyway 
+PASS when calling abort() twice on the same stream, both should give the same promise that fulfills with undefined 
+PASS when calling abort() twice on the same stream, but sequentially so so there's no pending abort the second time, both should fulfill with undefined 
+PASS calling abort() on an errored stream should fulfill with undefined 
+PASS sink abort() should not be called if stream was erroring due to controller.error() before abort() was called 
+PASS sink abort() should not be called if stream was erroring due to bad strategy before abort() was called 
+PASS abort with no arguments should set the stored error to undefined 
+PASS abort with an undefined argument should set the stored error to undefined 
+PASS abort with a string argument should set the stored error to that argument 
+PASS abort on a locked stream should reject 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-strategies.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-strategies.any-expected.txt
index 081b80b..1018c82 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-strategies.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-strategies.any-expected.txt
@@ -3,7 +3,7 @@
 PASS reject any non-function value for strategy.size 
 PASS Writable stream: throwing strategy.highWaterMark getter 
 PASS Writable stream: invalid strategy.highWaterMark 
-FAIL Writable stream: throwing strategy.size method ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Writable stream: invalid strategy.size return value ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS Writable stream: throwing strategy.size method 
+PASS Writable stream: invalid strategy.size return value 
 PASS Writable stream: invalid size beats invalid highWaterMark 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-strategies.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-strategies.any.worker-expected.txt
index ced53fa..1018c82 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-strategies.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-strategies.any.worker-expected.txt
@@ -1,43 +1,9 @@
 
-FAIL Writable stream: throwing strategy.size getter assert_throws_exactly: construction should re-throw the error function "() => {
-    new WritableStream({}, {
-      get size() {
-        throw error1;
-      },
-      highWaterMark: 5
-    });
-  }" threw object "ReferenceError: Can't find variable: WritableStream" but we expected it to throw object "error1: a unique string"
-FAIL reject any non-function value for strategy.size assert_throws_js: function "() => {
-    new WritableStream({}, { size: 'a string' });
-  }" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL Writable stream: throwing strategy.highWaterMark getter assert_throws_exactly: construction should re-throw the error function "() => {
-    new WritableStream({}, {
-      size() {
-        return 1;
-      },
-      get highWaterMark() {
-        throw error1;
-      }
-    });
-  }" threw object "ReferenceError: Can't find variable: WritableStream" but we expected it to throw object "error1: a unique string"
-FAIL Writable stream: invalid strategy.highWaterMark assert_throws_js: construction should throw a RangeError for -1 function "() => {
-      new WritableStream({}, {
-        size() {
-          return 1;
-        },
-        highWaterMark
-      });
-    }" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function RangeError() {
-    [native code]
-}" ("RangeError")
-FAIL Writable stream: throwing strategy.size method Can't find variable: WritableStream
-FAIL Writable stream: invalid strategy.size return value Can't find variable: WritableStream
-FAIL Writable stream: invalid size beats invalid highWaterMark assert_throws_js: WritableStream constructor should throw a TypeError function "() => new WritableStream(undefined, {
-    size: 'not a function',
-    highWaterMark: NaN
-  })" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
+PASS Writable stream: throwing strategy.size getter 
+PASS reject any non-function value for strategy.size 
+PASS Writable stream: throwing strategy.highWaterMark getter 
+PASS Writable stream: invalid strategy.highWaterMark 
+PASS Writable stream: throwing strategy.size method 
+PASS Writable stream: invalid strategy.size return value 
+PASS Writable stream: invalid size beats invalid highWaterMark 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-underlying-sinks.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-underlying-sinks.any-expected.txt
index 046f750..5ba26a8 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-underlying-sinks.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-underlying-sinks.any-expected.txt
@@ -1,27 +1,17 @@
 
+Harness Error (FAIL), message = Unhandled rejection: error1
+
 PASS start: errors in start cause WritableStream constructor to throw 
-FAIL close: throwing method should cause writer close() and ready to reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL close: returning a rejected promise should cause writer close() and ready to reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL close: throwing getter should cause constructor to throw assert_throws_exactly: constructor should throw function "() => new WritableStream({
-    get close() {
-      throw error1;
-    }
-  })" did not throw
-FAIL write: throwing getter should cause write() and closed to reject assert_throws_exactly: constructor should throw function "() => new WritableStream({
-    get write() {
-      throw error1;
-    }
-  })" did not throw
-FAIL write: throwing method should cause write() and closed to reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL write: returning a promise that becomes rejected after the writer write() should cause writer write() and ready to reject promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL write: returning a rejected promise (second write) should cause writer write() and ready to reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+FAIL close: throwing method should cause writer close() and ready to reject assert_unreached: Should have rejected: ready promise must reject with the thrown error Reached unreachable code
+FAIL close: returning a rejected promise should cause writer close() and ready to reject assert_unreached: Should have rejected: ready promise must reject with the same error Reached unreachable code
+PASS close: throwing getter should cause constructor to throw 
+PASS write: throwing getter should cause write() and closed to reject 
+PASS write: throwing method should cause write() and closed to reject 
+PASS write: returning a promise that becomes rejected after the writer write() should cause writer write() and ready to reject 
+PASS write: returning a rejected promise (second write) should cause writer write() and ready to reject 
 FAIL abort: non-function abort method with .apply assert_throws_js: constructor should throw function "() => new WritableStream({
     abort: { apply() {} }
   })" did not throw
-FAIL abort: throwing getter should cause abort() and closed to reject assert_throws_exactly: constructor should throw function "() => new WritableStream({
-    get abort() {
-      throw error1;
-    }
-  })" did not throw
-FAIL abort: throwing method should cause abort() and closed to reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS abort: throwing getter should cause abort() and closed to reject 
+PASS abort: throwing method should cause abort() and closed to reject 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-underlying-sinks.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-underlying-sinks.any.worker-expected.txt
index 2327723..5ba26a8 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-underlying-sinks.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/bad-underlying-sinks.any.worker-expected.txt
@@ -1,35 +1,17 @@
 
-FAIL start: errors in start cause WritableStream constructor to throw assert_throws_exactly: constructor should throw same error as throwing start getter function "() => {
-    new WritableStream({
-      get start() {
-        throw error1;
-      }
-    });
-  }" threw object "ReferenceError: Can't find variable: WritableStream" but we expected it to throw object "error1: error1"
-FAIL close: throwing method should cause writer close() and ready to reject Can't find variable: WritableStream
-FAIL close: returning a rejected promise should cause writer close() and ready to reject Can't find variable: WritableStream
-FAIL close: throwing getter should cause constructor to throw assert_throws_exactly: constructor should throw function "() => new WritableStream({
-    get close() {
-      throw error1;
-    }
-  })" threw object "ReferenceError: Can't find variable: WritableStream" but we expected it to throw object "error1: error1"
-FAIL write: throwing getter should cause write() and closed to reject assert_throws_exactly: constructor should throw function "() => new WritableStream({
-    get write() {
-      throw error1;
-    }
-  })" threw object "ReferenceError: Can't find variable: WritableStream" but we expected it to throw object "error1: error1"
-FAIL write: throwing method should cause write() and closed to reject Can't find variable: WritableStream
-FAIL write: returning a promise that becomes rejected after the writer write() should cause writer write() and ready to reject Can't find variable: WritableStream
-FAIL write: returning a rejected promise (second write) should cause writer write() and ready to reject Can't find variable: WritableStream
+Harness Error (FAIL), message = Unhandled rejection: error1
+
+PASS start: errors in start cause WritableStream constructor to throw 
+FAIL close: throwing method should cause writer close() and ready to reject assert_unreached: Should have rejected: ready promise must reject with the thrown error Reached unreachable code
+FAIL close: returning a rejected promise should cause writer close() and ready to reject assert_unreached: Should have rejected: ready promise must reject with the same error Reached unreachable code
+PASS close: throwing getter should cause constructor to throw 
+PASS write: throwing getter should cause write() and closed to reject 
+PASS write: throwing method should cause write() and closed to reject 
+PASS write: returning a promise that becomes rejected after the writer write() should cause writer write() and ready to reject 
+PASS write: returning a rejected promise (second write) should cause writer write() and ready to reject 
 FAIL abort: non-function abort method with .apply assert_throws_js: constructor should throw function "() => new WritableStream({
     abort: { apply() {} }
-  })" threw object "ReferenceError: Can't find variable: WritableStream" ("ReferenceError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL abort: throwing getter should cause abort() and closed to reject assert_throws_exactly: constructor should throw function "() => new WritableStream({
-    get abort() {
-      throw error1;
-    }
-  })" threw object "ReferenceError: Can't find variable: WritableStream" but we expected it to throw object "error1: error1"
-FAIL abort: throwing method should cause abort() and closed to reject Can't find variable: WritableStream
+  })" did not throw
+PASS abort: throwing getter should cause abort() and closed to reject 
+PASS abort: throwing method should cause abort() and closed to reject 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any-expected.txt
index d32dbd9..5b1fc91 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any-expected.txt
@@ -1,3 +1,3 @@
 
-FAIL Closing a writable stream with in-flight writes below the high water mark delays the close call properly ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS Closing a writable stream with in-flight writes below the high water mark delays the close call properly 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any.worker-expected.txt
index 9f7541d..5b1fc91 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/byte-length-queuing-strategy.any.worker-expected.txt
@@ -1,3 +1,3 @@
 
-FAIL Closing a writable stream with in-flight writes below the high water mark delays the close call properly Can't find variable: WritableStream
+PASS Closing a writable stream with in-flight writes below the high water mark delays the close call properly 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/close.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/close.any-expected.txt
index cf15452..c050bfd 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/close.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/close.any-expected.txt
@@ -1,27 +1,29 @@
 
-FAIL fulfillment value of writer.close() call must be undefined even if the underlying sink returns a non-undefined value ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL when sink calls error asynchronously while sink close is in-flight, the stream should not become errored ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL when sink calls error synchronously while closing, the stream should not become errored ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL when the sink throws during close, and the close is requested while a write is still in-flight, the stream should become errored during the close ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL releaseLock on a stream with a pending write in which the stream has been errored ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL releaseLock on a stream with a pending close in which controller.error() was called ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL when close is called on a WritableStream in writable state, ready should return a fulfilled promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL when close is called on a WritableStream in waiting state, ready promise should be fulfilled ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL when close is called on a WritableStream in waiting state, ready should be fulfilled immediately even if close takes a long time ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL returning a thenable from close() should work ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL releaseLock() should not change the result of sync close() ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL releaseLock() should not change the result of async close() ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL close() should set state to CLOSED even if writer has detached ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL the promise returned by async abort during close should resolve ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL promises must fulfill/reject in the expected order on closure ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL promises must fulfill/reject in the expected order on aborted closure promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL promises must fulfill/reject in the expected order on aborted and errored closure promise_test: Unhandled rejection with value: object "TypeError: ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)"
-FAIL close() should not reject until no sink methods are in flight ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL ready promise should be initialised as fulfilled for a writer on a closed stream ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL close() on a writable stream should work ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL close() on a locked stream should reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL close() on an erroring stream should reject controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)
-FAIL close() on an errored stream should reject controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)
-FAIL close() on an closed stream should reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL close() on a stream with a pending close should reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+Harness Error (FAIL), message = Unhandled rejection: error1
+
+PASS fulfillment value of writer.close() call must be undefined even if the underlying sink returns a non-undefined value 
+PASS when sink calls error asynchronously while sink close is in-flight, the stream should not become errored 
+PASS when sink calls error synchronously while closing, the stream should not become errored 
+PASS when the sink throws during close, and the close is requested while a write is still in-flight, the stream should become errored during the close 
+PASS releaseLock on a stream with a pending write in which the stream has been errored 
+PASS releaseLock on a stream with a pending close in which controller.error() was called 
+PASS when close is called on a WritableStream in writable state, ready should return a fulfilled promise 
+PASS when close is called on a WritableStream in waiting state, ready promise should be fulfilled 
+PASS when close is called on a WritableStream in waiting state, ready should be fulfilled immediately even if close takes a long time 
+PASS returning a thenable from close() should work 
+PASS releaseLock() should not change the result of sync close() 
+PASS releaseLock() should not change the result of async close() 
+PASS close() should set state to CLOSED even if writer has detached 
+PASS the promise returned by async abort during close should resolve 
+PASS promises must fulfill/reject in the expected order on closure 
+PASS promises must fulfill/reject in the expected order on aborted closure 
+PASS promises must fulfill/reject in the expected order on aborted and errored closure 
+PASS close() should not reject until no sink methods are in flight 
+PASS ready promise should be initialised as fulfilled for a writer on a closed stream 
+PASS close() on a writable stream should work 
+PASS close() on a locked stream should reject 
+PASS close() on an erroring stream should reject 
+PASS close() on an errored stream should reject 
+PASS close() on an closed stream should reject 
+PASS close() on a stream with a pending close should reject 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/close.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/close.any.worker-expected.txt
index ed43fae..c050bfd 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/close.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/close.any.worker-expected.txt
@@ -1,27 +1,29 @@
 
-FAIL fulfillment value of writer.close() call must be undefined even if the underlying sink returns a non-undefined value Can't find variable: WritableStream
-FAIL when sink calls error asynchronously while sink close is in-flight, the stream should not become errored Can't find variable: WritableStream
-FAIL when sink calls error synchronously while closing, the stream should not become errored Can't find variable: WritableStream
-FAIL when the sink throws during close, and the close is requested while a write is still in-flight, the stream should become errored during the close Can't find variable: WritableStream
-FAIL releaseLock on a stream with a pending write in which the stream has been errored Can't find variable: WritableStream
-FAIL releaseLock on a stream with a pending close in which controller.error() was called Can't find variable: WritableStream
-FAIL when close is called on a WritableStream in writable state, ready should return a fulfilled promise Can't find variable: WritableStream
-FAIL when close is called on a WritableStream in waiting state, ready promise should be fulfilled Can't find variable: WritableStream
-FAIL when close is called on a WritableStream in waiting state, ready should be fulfilled immediately even if close takes a long time Can't find variable: WritableStream
-FAIL returning a thenable from close() should work Can't find variable: WritableStream
-FAIL releaseLock() should not change the result of sync close() Can't find variable: WritableStream
-FAIL releaseLock() should not change the result of async close() Can't find variable: WritableStream
-FAIL close() should set state to CLOSED even if writer has detached Can't find variable: WritableStream
-FAIL the promise returned by async abort during close should resolve Can't find variable: WritableStream
-FAIL promises must fulfill/reject in the expected order on closure Can't find variable: WritableStream
-FAIL promises must fulfill/reject in the expected order on aborted closure Can't find variable: WritableStream
-FAIL promises must fulfill/reject in the expected order on aborted and errored closure Can't find variable: WritableStream
-FAIL close() should not reject until no sink methods are in flight Can't find variable: WritableStream
-FAIL ready promise should be initialised as fulfilled for a writer on a closed stream Can't find variable: WritableStream
-FAIL close() on a writable stream should work Can't find variable: WritableStream
-FAIL close() on a locked stream should reject Can't find variable: WritableStream
-FAIL close() on an erroring stream should reject Can't find variable: WritableStream
-FAIL close() on an errored stream should reject Can't find variable: WritableStream
-FAIL close() on an closed stream should reject Can't find variable: WritableStream
-FAIL close() on a stream with a pending close should reject Can't find variable: WritableStream
+Harness Error (FAIL), message = Unhandled rejection: error1
+
+PASS fulfillment value of writer.close() call must be undefined even if the underlying sink returns a non-undefined value 
+PASS when sink calls error asynchronously while sink close is in-flight, the stream should not become errored 
+PASS when sink calls error synchronously while closing, the stream should not become errored 
+PASS when the sink throws during close, and the close is requested while a write is still in-flight, the stream should become errored during the close 
+PASS releaseLock on a stream with a pending write in which the stream has been errored 
+PASS releaseLock on a stream with a pending close in which controller.error() was called 
+PASS when close is called on a WritableStream in writable state, ready should return a fulfilled promise 
+PASS when close is called on a WritableStream in waiting state, ready promise should be fulfilled 
+PASS when close is called on a WritableStream in waiting state, ready should be fulfilled immediately even if close takes a long time 
+PASS returning a thenable from close() should work 
+PASS releaseLock() should not change the result of sync close() 
+PASS releaseLock() should not change the result of async close() 
+PASS close() should set state to CLOSED even if writer has detached 
+PASS the promise returned by async abort during close should resolve 
+PASS promises must fulfill/reject in the expected order on closure 
+PASS promises must fulfill/reject in the expected order on aborted closure 
+PASS promises must fulfill/reject in the expected order on aborted and errored closure 
+PASS close() should not reject until no sink methods are in flight 
+PASS ready promise should be initialised as fulfilled for a writer on a closed stream 
+PASS close() on a writable stream should work 
+PASS close() on a locked stream should reject 
+PASS close() on an erroring stream should reject 
+PASS close() on an errored stream should reject 
+PASS close() on an closed stream should reject 
+PASS close() on a stream with a pending close should reject 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/constructor.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/constructor.any-expected.txt
index 1956934..ba8fcbb 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/constructor.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/constructor.any-expected.txt
@@ -1,18 +1,14 @@
 
-FAIL controller argument should be passed to start method controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)
-FAIL controller argument should be passed to write method ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL controller argument should not be passed to close method ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL highWaterMark should be reflected to desiredSize ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL WritableStream should be writable and ready should fulfill immediately if the strategy does not apply backpressure ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS controller argument should be passed to start method 
+PASS controller argument should be passed to write method 
+PASS controller argument should not be passed to close method 
+PASS highWaterMark should be reflected to desiredSize 
+PASS WritableStream should be writable and ready should fulfill immediately if the strategy does not apply backpressure 
 PASS WritableStream should be constructible with no arguments 
 PASS underlyingSink argument should be converted after queuingStrategy argument 
-FAIL WritableStream instances should have standard methods and properties ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL WritableStreamDefaultController constructor should throw assert_throws_js: constructor should throw a TypeError exception function "() => new WritableStreamDefaultController({})" threw object "SyntaxError: Unexpected identifier 'Object'. Expected either a closing ']' or a ',' following an array element." ("SyntaxError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL WritableStreamDefaultController constructor should throw when passed an initialised WritableStream assert_throws_js: constructor should throw a TypeError exception function "() => new WritableStreamDefaultController(stream)" threw object "SyntaxError: Unexpected identifier 'WritableStream'. Expected either a closing ']' or a ',' following an array element." ("SyntaxError") expected instance of function "function TypeError() {
-    [native code]
-}" ("TypeError")
-FAIL WritableStreamDefaultWriter should throw unless passed a WritableStream stream.getWriter is not a function. (In 'stream.getWriter()', 'stream.getWriter' is undefined)
-FAIL WritableStreamDefaultWriter constructor should throw when stream argument is locked stream.getWriter is not a function. (In 'stream.getWriter()', 'stream.getWriter' is undefined)
+PASS WritableStream instances should have standard methods and properties 
+FAIL WritableStreamDefaultController constructor should throw assert_throws_js: constructor should throw a TypeError exception function "() => new WritableStreamDefaultController({})" did not throw
+FAIL WritableStreamDefaultController constructor should throw when passed an initialised WritableStream assert_throws_js: constructor should throw a TypeError exception function "() => new WritableStreamDefaultController(stream)" did not throw
+PASS WritableStreamDefaultWriter should throw unless passed a WritableStream 
+PASS WritableStreamDefaultWriter constructor should throw when stream argument is locked 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/constructor.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/constructor.any.worker-expected.txt
index b5072ef..ba8fcbb 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/constructor.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/constructor.any.worker-expected.txt
@@ -1,14 +1,14 @@
 
-FAIL controller argument should be passed to start method Can't find variable: WritableStream
-FAIL controller argument should be passed to write method Can't find variable: WritableStream
-FAIL controller argument should not be passed to close method Can't find variable: WritableStream
-FAIL highWaterMark should be reflected to desiredSize Can't find variable: WritableStream
-FAIL WritableStream should be writable and ready should fulfill immediately if the strategy does not apply backpressure Can't find variable: WritableStream
-FAIL WritableStream should be constructible with no arguments Can't find variable: WritableStream
-FAIL underlyingSink argument should be converted after queuingStrategy argument assert_throws_exactly: function "() => new WritableStream(underlyingSink, queuingStrategy)" threw object "ReferenceError: Can't find variable: WritableStream" but we expected it to throw object "error2: error2"
-FAIL WritableStream instances should have standard methods and properties Can't find variable: WritableStream
-FAIL WritableStreamDefaultController constructor should throw Can't find variable: WritableStream
-FAIL WritableStreamDefaultController constructor should throw when passed an initialised WritableStream Can't find variable: WritableStream
-FAIL WritableStreamDefaultWriter should throw unless passed a WritableStream Can't find variable: WritableStream
-FAIL WritableStreamDefaultWriter constructor should throw when stream argument is locked Can't find variable: WritableStream
+PASS controller argument should be passed to start method 
+PASS controller argument should be passed to write method 
+PASS controller argument should not be passed to close method 
+PASS highWaterMark should be reflected to desiredSize 
+PASS WritableStream should be writable and ready should fulfill immediately if the strategy does not apply backpressure 
+PASS WritableStream should be constructible with no arguments 
+PASS underlyingSink argument should be converted after queuingStrategy argument 
+PASS WritableStream instances should have standard methods and properties 
+FAIL WritableStreamDefaultController constructor should throw assert_throws_js: constructor should throw a TypeError exception function "() => new WritableStreamDefaultController({})" did not throw
+FAIL WritableStreamDefaultController constructor should throw when passed an initialised WritableStream assert_throws_js: constructor should throw a TypeError exception function "() => new WritableStreamDefaultController(stream)" did not throw
+PASS WritableStreamDefaultWriter should throw unless passed a WritableStream 
+PASS WritableStreamDefaultWriter constructor should throw when stream argument is locked 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/count-queuing-strategy.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/count-queuing-strategy.any-expected.txt
index bbf8d35..9457d6f 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/count-queuing-strategy.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/count-queuing-strategy.any-expected.txt
@@ -1,5 +1,5 @@
 
 PASS Can construct a writable stream with a valid CountQueuingStrategy 
-FAIL Correctly governs the value of a WritableStream's state property (HWM = 0) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Correctly governs the value of a WritableStream's state property (HWM = 4) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS Correctly governs the value of a WritableStream's state property (HWM = 0) 
+PASS Correctly governs the value of a WritableStream's state property (HWM = 4) 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/count-queuing-strategy.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/count-queuing-strategy.any.worker-expected.txt
index 4842bb1..9457d6f 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/count-queuing-strategy.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/count-queuing-strategy.any.worker-expected.txt
@@ -1,5 +1,5 @@
 
-FAIL Can construct a writable stream with a valid CountQueuingStrategy Can't find variable: WritableStream
-FAIL Correctly governs the value of a WritableStream's state property (HWM = 0) Can't find variable: WritableStream
-FAIL Correctly governs the value of a WritableStream's state property (HWM = 4) Can't find variable: WritableStream
+PASS Can construct a writable stream with a valid CountQueuingStrategy 
+PASS Correctly governs the value of a WritableStream's state property (HWM = 0) 
+PASS Correctly governs the value of a WritableStream's state property (HWM = 4) 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/error.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/error.any-expected.txt
index 0af86fa..3348b0f 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/error.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/error.any-expected.txt
@@ -1,7 +1,7 @@
 
-FAIL controller.error() should error the stream controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)
-FAIL controller.error() on erroring stream should not throw controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)
-FAIL surplus calls to controller.error() should be a no-op controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)
-FAIL controller.error() on errored stream should not throw promise_test: Unhandled rejection with value: object "TypeError: controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)"
-FAIL controller.error() on closed stream should not throw ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS controller.error() should error the stream 
+PASS controller.error() on erroring stream should not throw 
+PASS surplus calls to controller.error() should be a no-op 
+PASS controller.error() on errored stream should not throw 
+PASS controller.error() on closed stream should not throw 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/error.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/error.any.worker-expected.txt
index 7c79759..3348b0f 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/error.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/error.any.worker-expected.txt
@@ -1,7 +1,7 @@
 
-FAIL controller.error() should error the stream Can't find variable: WritableStream
-FAIL controller.error() on erroring stream should not throw Can't find variable: WritableStream
-FAIL surplus calls to controller.error() should be a no-op Can't find variable: WritableStream
-FAIL controller.error() on errored stream should not throw Can't find variable: WritableStream
-FAIL controller.error() on closed stream should not throw Can't find variable: WritableStream
+PASS controller.error() should error the stream 
+PASS controller.error() on erroring stream should not throw 
+PASS surplus calls to controller.error() should be a no-op 
+PASS controller.error() on errored stream should not throw 
+PASS controller.error() on closed stream should not throw 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any-expected.txt
index 9833840..a7f197e 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any-expected.txt
@@ -1,6 +1,6 @@
 
-FAIL Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Floating point arithmetic must manifest near 0 (total ends up positive, but clamped) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL Floating point arithmetic must manifest near 0 (total ends up zero) ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive) 
+PASS Floating point arithmetic must manifest near 0 (total ends up positive, but clamped) 
+PASS Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped) 
+PASS Floating point arithmetic must manifest near 0 (total ends up zero) 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any.worker-expected.txt
index 7ed346e..a7f197e 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/floating-point-total-queue-size.any.worker-expected.txt
@@ -1,6 +1,6 @@
 
-FAIL Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive) Can't find variable: WritableStream
-FAIL Floating point arithmetic must manifest near 0 (total ends up positive, but clamped) Can't find variable: WritableStream
-FAIL Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped) Can't find variable: WritableStream
-FAIL Floating point arithmetic must manifest near 0 (total ends up zero) Can't find variable: WritableStream
+PASS Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive) 
+PASS Floating point arithmetic must manifest near 0 (total ends up positive, but clamped) 
+PASS Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped) 
+PASS Floating point arithmetic must manifest near 0 (total ends up zero) 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/general.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/general.any-expected.txt
index baef441..3657b55 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/general.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/general.any-expected.txt
@@ -1,18 +1,18 @@
 
-FAIL desiredSize on a released writer ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL desiredSize initial value ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL desiredSize on a writer for a closed stream ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL desiredSize on a writer for an errored stream c.error is not a function. (In 'c.error()', 'c.error' is undefined)
-FAIL ws.getWriter() on a closing WritableStream ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL ws.getWriter() on a closed WritableStream ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL ws.getWriter() on an aborted WritableStream ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL ws.getWriter() on an errored WritableStream c.error is not a function. (In 'c.error()', 'c.error' is undefined)
-FAIL closed and ready on a released writer ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL WritableStream should call underlying sink methods as methods ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL methods should not not have .apply() or .call() called ws1.getWriter is not a function. (In 'ws1.getWriter()', 'ws1.getWriter' is undefined)
-FAIL WritableStream's strategy.size should not be called as a method highWaterMark value is negative or not a number
-FAIL redundant releaseLock() is no-op ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL ready promise should fire before closed on releaseLock ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS desiredSize on a released writer 
+PASS desiredSize initial value 
+PASS desiredSize on a writer for a closed stream 
+PASS desiredSize on a writer for an errored stream 
+PASS ws.getWriter() on a closing WritableStream 
+PASS ws.getWriter() on a closed WritableStream 
+PASS ws.getWriter() on an aborted WritableStream 
+PASS ws.getWriter() on an errored WritableStream 
+FAIL closed and ready on a released writer assert_unreached: writer.ready fulfilled unexpectedly with: undefined Reached unreachable code
+PASS WritableStream should call underlying sink methods as methods 
+PASS methods should not not have .apply() or .call() called 
+PASS WritableStream's strategy.size should not be called as a method 
+PASS redundant releaseLock() is no-op 
+PASS ready promise should fire before closed on releaseLock 
 FAIL Subclassing WritableStream should work assert_true: Subclass object should be an instance of Subclass expected true got false
-FAIL the locked getter should return true if the stream has a writer assert_false: stream should not be locked expected false got undefined
+PASS the locked getter should return true if the stream has a writer 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/general.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/general.any.worker-expected.txt
index feab5bc..3657b55 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/general.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/general.any.worker-expected.txt
@@ -1,18 +1,18 @@
 
-FAIL desiredSize on a released writer Can't find variable: WritableStream
-FAIL desiredSize initial value Can't find variable: WritableStream
-FAIL desiredSize on a writer for a closed stream Can't find variable: WritableStream
-FAIL desiredSize on a writer for an errored stream Can't find variable: WritableStream
-FAIL ws.getWriter() on a closing WritableStream Can't find variable: WritableStream
-FAIL ws.getWriter() on a closed WritableStream Can't find variable: WritableStream
-FAIL ws.getWriter() on an aborted WritableStream Can't find variable: WritableStream
-FAIL ws.getWriter() on an errored WritableStream Can't find variable: WritableStream
-FAIL closed and ready on a released writer Can't find variable: WritableStream
-FAIL WritableStream should call underlying sink methods as methods Can't find variable: WritableStream
-FAIL methods should not not have .apply() or .call() called Can't find variable: WritableStream
-FAIL WritableStream's strategy.size should not be called as a method Can't find variable: WritableStream
-FAIL redundant releaseLock() is no-op Can't find variable: WritableStream
-FAIL ready promise should fire before closed on releaseLock Can't find variable: WritableStream
-FAIL Subclassing WritableStream should work Can't find variable: WritableStream
-FAIL the locked getter should return true if the stream has a writer Can't find variable: WritableStream
+PASS desiredSize on a released writer 
+PASS desiredSize initial value 
+PASS desiredSize on a writer for a closed stream 
+PASS desiredSize on a writer for an errored stream 
+PASS ws.getWriter() on a closing WritableStream 
+PASS ws.getWriter() on a closed WritableStream 
+PASS ws.getWriter() on an aborted WritableStream 
+PASS ws.getWriter() on an errored WritableStream 
+FAIL closed and ready on a released writer assert_unreached: writer.ready fulfilled unexpectedly with: undefined Reached unreachable code
+PASS WritableStream should call underlying sink methods as methods 
+PASS methods should not not have .apply() or .call() called 
+PASS WritableStream's strategy.size should not be called as a method 
+PASS redundant releaseLock() is no-op 
+PASS ready promise should fire before closed on releaseLock 
+FAIL Subclassing WritableStream should work assert_true: Subclass object should be an instance of Subclass expected true got false
+PASS the locked getter should return true if the stream has a writer 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/properties.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/properties.any-expected.txt
index 7254489..c78525e 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/properties.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/properties.any-expected.txt
@@ -1,10 +1,10 @@
 
-FAIL sink method start should be called with the right number of arguments ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL sink method start should be called even when it's located on the prototype chain ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL sink method write should be called with the right number of arguments ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL sink method write should be called even when it's located on the prototype chain ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL sink method close should be called with the right number of arguments ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL sink method close should be called even when it's located on the prototype chain ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL sink method abort should be called with the right number of arguments ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL sink method abort should be called even when it's located on the prototype chain ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS sink method start should be called with the right number of arguments 
+PASS sink method start should be called even when it's located on the prototype chain 
+PASS sink method write should be called with the right number of arguments 
+PASS sink method write should be called even when it's located on the prototype chain 
+PASS sink method close should be called with the right number of arguments 
+PASS sink method close should be called even when it's located on the prototype chain 
+PASS sink method abort should be called with the right number of arguments 
+PASS sink method abort should be called even when it's located on the prototype chain 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/properties.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/properties.any.worker-expected.txt
index 3443a59..c78525e 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/properties.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/properties.any.worker-expected.txt
@@ -1,10 +1,10 @@
 
-FAIL sink method start should be called with the right number of arguments Can't find variable: WritableStream
-FAIL sink method start should be called even when it's located on the prototype chain Can't find variable: WritableStream
-FAIL sink method write should be called with the right number of arguments Can't find variable: WritableStream
-FAIL sink method write should be called even when it's located on the prototype chain Can't find variable: WritableStream
-FAIL sink method close should be called with the right number of arguments Can't find variable: WritableStream
-FAIL sink method close should be called even when it's located on the prototype chain Can't find variable: WritableStream
-FAIL sink method abort should be called with the right number of arguments Can't find variable: WritableStream
-FAIL sink method abort should be called even when it's located on the prototype chain Can't find variable: WritableStream
+PASS sink method start should be called with the right number of arguments 
+PASS sink method start should be called even when it's located on the prototype chain 
+PASS sink method write should be called with the right number of arguments 
+PASS sink method write should be called even when it's located on the prototype chain 
+PASS sink method close should be called with the right number of arguments 
+PASS sink method close should be called even when it's located on the prototype chain 
+PASS sink method abort should be called with the right number of arguments 
+PASS sink method abort should be called even when it's located on the prototype chain 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/reentrant-strategy.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/reentrant-strategy.any-expected.txt
index 731fa2c..5d89e85 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/reentrant-strategy.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/reentrant-strategy.any-expected.txt
@@ -1,9 +1,9 @@
 
-FAIL writes should be written in the standard order highWaterMark value is negative or not a number
-FAIL writer.write() promises should resolve in the standard order highWaterMark value is negative or not a number
-FAIL controller.error() should work when called from within strategy.size() highWaterMark value is negative or not a number
-FAIL close() should work when called from within strategy.size() highWaterMark value is negative or not a number
-FAIL abort() should work when called from within strategy.size() highWaterMark value is negative or not a number
-FAIL releaseLock() should abort the write() when called within strategy.size() highWaterMark value is negative or not a number
-FAIL original reader should error when new reader is created within strategy.size() highWaterMark value is negative or not a number
+PASS writes should be written in the standard order 
+PASS writer.write() promises should resolve in the standard order 
+FAIL controller.error() should work when called from within strategy.size() assert_unreached: Should have rejected: ready should reject with error1 Reached unreachable code
+PASS close() should work when called from within strategy.size() 
+PASS abort() should work when called from within strategy.size() 
+FAIL releaseLock() should abort the write() when called within strategy.size() assert_unreached: Should have rejected: ready promise should reject Reached unreachable code
+FAIL original reader should error when new reader is created within strategy.size() assert_unreached: Should have rejected: ready promise should reject Reached unreachable code
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/reentrant-strategy.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/reentrant-strategy.any.worker-expected.txt
index 0bc0974..5d89e85 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/reentrant-strategy.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/reentrant-strategy.any.worker-expected.txt
@@ -1,9 +1,9 @@
 
-FAIL writes should be written in the standard order Can't find variable: WritableStream
-FAIL writer.write() promises should resolve in the standard order Can't find variable: WritableStream
-FAIL controller.error() should work when called from within strategy.size() Can't find variable: WritableStream
-FAIL close() should work when called from within strategy.size() Can't find variable: WritableStream
-FAIL abort() should work when called from within strategy.size() Can't find variable: WritableStream
-FAIL releaseLock() should abort the write() when called within strategy.size() Can't find variable: WritableStream
-FAIL original reader should error when new reader is created within strategy.size() Can't find variable: WritableStream
+PASS writes should be written in the standard order 
+PASS writer.write() promises should resolve in the standard order 
+FAIL controller.error() should work when called from within strategy.size() assert_unreached: Should have rejected: ready should reject with error1 Reached unreachable code
+PASS close() should work when called from within strategy.size() 
+PASS abort() should work when called from within strategy.size() 
+FAIL releaseLock() should abort the write() when called within strategy.size() assert_unreached: Should have rejected: ready promise should reject Reached unreachable code
+FAIL original reader should error when new reader is created within strategy.size() assert_unreached: Should have rejected: ready promise should reject Reached unreachable code
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/start.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/start.any-expected.txt
index bd1412c..d0ac65a 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/start.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/start.any-expected.txt
@@ -1,15 +1,10 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: [object Object]
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
 
-Harness Error (FAIL), message = Unhandled rejection
-
-FAIL underlying sink's write should not be called until start finishes ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL underlying sink's close should not be called until start finishes ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS underlying sink's write should not be called until start finishes 
+PASS underlying sink's close should not be called until start finishes 
 PASS underlying sink's write or close should not be called if start throws 
 PASS underlying sink's write or close should not be invoked if the promise returned by start is rejected 
-FAIL returning a thenable from start() should work ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL controller.error() during start should cause writes to fail controller.error is not a function. (In 'controller.error(error1)', 'controller.error' is undefined)
-FAIL controller.error() during async start should cause existing writes to fail ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL when start() rejects, writer promises should reject in standard order ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS returning a thenable from start() should work 
+PASS controller.error() during start should cause writes to fail 
+PASS controller.error() during async start should cause existing writes to fail 
+PASS when start() rejects, writer promises should reject in standard order 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/start.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/start.any.worker-expected.txt
index 32b83f8..d0ac65a 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/start.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/start.any.worker-expected.txt
@@ -1,24 +1,10 @@
 
-FAIL underlying sink's write should not be called until start finishes Can't find variable: WritableStream
-FAIL underlying sink's close should not be called until start finishes Can't find variable: WritableStream
-FAIL underlying sink's write or close should not be called if start throws assert_throws_exactly: constructor should throw passedError function "() => {
-    // recordingWritableStream cannot be used here because the exception in the
-    // constructor prevents assigning the object to a variable.
-    new WritableStream({
-      start() {
-        throw passedError;
-      },
-      write() {
-        writeCalled = true;
-      },
-      close() {
-        closeCalled = true;
-      }
-    });
-  }" threw object "ReferenceError: Can't find variable: WritableStream" but we expected it to throw object "Error: horrible things"
-FAIL underlying sink's write or close should not be invoked if the promise returned by start is rejected Can't find variable: WritableStream
-FAIL returning a thenable from start() should work Can't find variable: WritableStream
-FAIL controller.error() during start should cause writes to fail Can't find variable: WritableStream
-FAIL controller.error() during async start should cause existing writes to fail Can't find variable: WritableStream
-FAIL when start() rejects, writer promises should reject in standard order Can't find variable: WritableStream
+PASS underlying sink's write should not be called until start finishes 
+PASS underlying sink's close should not be called until start finishes 
+PASS underlying sink's write or close should not be called if start throws 
+PASS underlying sink's write or close should not be invoked if the promise returned by start is rejected 
+PASS returning a thenable from start() should work 
+PASS controller.error() during start should cause writes to fail 
+PASS controller.error() during async start should cause existing writes to fail 
+PASS when start() rejects, writer promises should reject in standard order 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/write.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/write.any-expected.txt
index ef5e114c..56d66c8 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/write.any-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/write.any-expected.txt
@@ -1,15 +1,15 @@
 
-FAIL WritableStream should complete asynchronous writes before close resolves ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL WritableStream should complete synchronous writes before close resolves ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL fulfillment value of ws.write() call should be undefined even if the underlying sink returns a non-undefined value ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL WritableStream should transition to waiting until write is acknowledged ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL when write returns a rejected promise, queued writes and close should be cleared ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL when sink's write throws an error, the stream should become errored and the promise should reject ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL writer.write(), ready and closed reject with the error passed to controller.error() made before sink.write rejection ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL a large queue of writes should be processed completely ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL WritableStreamDefaultWriter should work when manually constructed stream.getWriter is not a function. (In 'stream.getWriter()', 'stream.getWriter' is undefined)
-FAIL returning a thenable from write() should work ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL failing DefaultWriter constructor should not release an existing writer stream.getWriter is not a function. (In 'stream.getWriter()', 'stream.getWriter' is undefined)
-FAIL write() on a stream with HWM 0 should not cause the ready Promise to resolve ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
-FAIL writing to a released writer should reject the returned promise ws.getWriter is not a function. (In 'ws.getWriter()', 'ws.getWriter' is undefined)
+PASS WritableStream should complete asynchronous writes before close resolves 
+PASS WritableStream should complete synchronous writes before close resolves 
+PASS fulfillment value of ws.write() call should be undefined even if the underlying sink returns a non-undefined value 
+PASS WritableStream should transition to waiting until write is acknowledged 
+PASS when write returns a rejected promise, queued writes and close should be cleared 
+PASS when sink's write throws an error, the stream should become errored and the promise should reject 
+PASS writer.write(), ready and closed reject with the error passed to controller.error() made before sink.write rejection 
+PASS a large queue of writes should be processed completely 
+PASS WritableStreamDefaultWriter should work when manually constructed 
+PASS returning a thenable from write() should work 
+PASS failing DefaultWriter constructor should not release an existing writer 
+PASS write() on a stream with HWM 0 should not cause the ready Promise to resolve 
+PASS writing to a released writer should reject the returned promise 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/write.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/write.any.worker-expected.txt
index 9d30072..56d66c8 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/write.any.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/streams/writable-streams/write.any.worker-expected.txt
@@ -1,15 +1,15 @@
 
-FAIL WritableStream should complete asynchronous writes before close resolves Can't find variable: WritableStream
-FAIL WritableStream should complete synchronous writes before close resolves Can't find variable: WritableStream
-FAIL fulfillment value of ws.write() call should be undefined even if the underlying sink returns a non-undefined value Can't find variable: WritableStream
-FAIL WritableStream should transition to waiting until write is acknowledged Can't find variable: WritableStream
-FAIL when write returns a rejected promise, queued writes and close should be cleared Can't find variable: WritableStream
-FAIL when sink's write throws an error, the stream should become errored and the promise should reject Can't find variable: WritableStream
-FAIL writer.write(), ready and closed reject with the error passed to controller.error() made before sink.write rejection Can't find variable: WritableStream
-FAIL a large queue of writes should be processed completely Can't find variable: WritableStream
-FAIL WritableStreamDefaultWriter should work when manually constructed Can't find variable: WritableStream
-FAIL returning a thenable from write() should work Can't find variable: WritableStream
-FAIL failing DefaultWriter constructor should not release an existing writer Can't find variable: WritableStream
-FAIL write() on a stream with HWM 0 should not cause the ready Promise to resolve Can't find variable: WritableStream
-FAIL writing to a released writer should reject the returned promise Can't find variable: WritableStream
+PASS WritableStream should complete asynchronous writes before close resolves 
+PASS WritableStream should complete synchronous writes before close resolves 
+PASS fulfillment value of ws.write() call should be undefined even if the underlying sink returns a non-undefined value 
+PASS WritableStream should transition to waiting until write is acknowledged 
+PASS when write returns a rejected promise, queued writes and close should be cleared 
+PASS when sink's write throws an error, the stream should become errored and the promise should reject 
+PASS writer.write(), ready and closed reject with the error passed to controller.error() made before sink.write rejection 
+PASS a large queue of writes should be processed completely 
+PASS WritableStreamDefaultWriter should work when manually constructed 
+PASS returning a thenable from write() should work 
+PASS failing DefaultWriter constructor should not release an existing writer 
+PASS write() on a stream with HWM 0 should not cause the ready Promise to resolve 
+PASS writing to a released writer should reject the returned promise 
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt
index 5742b26d..2e52e63 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt
@@ -49,7 +49,7 @@
 PASS The CustomEvent interface object should be exposed. 
 PASS The DOMException interface object should be exposed. 
 PASS The ReadableStream interface object should be exposed. 
-FAIL The WritableStream interface object should be exposed. assert_own_property: expected property "WritableStream" missing
+PASS The WritableStream interface object should be exposed. 
 PASS The ByteLengthQueuingStrategy interface object should be exposed. 
 PASS The CountQueuingStrategy interface object should be exposed. 
 PASS The IDBRequest interface object should be exposed. 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/002.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/002.worker-expected.txt
index ec2f7ac..4621560 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/002.worker-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/002.worker-expected.txt
@@ -20,8 +20,8 @@
 PASS The ReadableStreamBYOBReader interface object should not be exposed. 
 PASS The ReadableStreamDefaultController interface object should not be exposed. 
 PASS The ReadableByteStreamController interface object should not be exposed. 
-PASS The WritableStreamDefaultWriter interface object should not be exposed. 
-PASS The WritableStreamDefaultController interface object should not be exposed. 
+FAIL The WritableStreamDefaultWriter interface object should not be exposed. assert_false: expected false got true
+FAIL The WritableStreamDefaultController interface object should not be exposed. assert_false: expected false got true
 PASS The IDBEnvironment interface object should not be exposed. 
 PASS The Database interface object should not be exposed. 
 PASS The UIEvent interface object should not be exposed. 
diff --git a/LayoutTests/js/dom/builtin-getter-name-expected.txt b/LayoutTests/js/dom/builtin-getter-name-expected.txt
index 0d4ed17..703e194 100644
--- a/LayoutTests/js/dom/builtin-getter-name-expected.txt
+++ b/LayoutTests/js/dom/builtin-getter-name-expected.txt
@@ -3,5 +3,5 @@
 PASS ReadableStream property names 
 PASS ReadableStreamDefaultReader property names 
 PASS ReadableStreamBYOBReader property names 
-PASS WritableStream property names 
+PASS WritableStreamDefaultWriter property names 
 
diff --git a/LayoutTests/js/dom/builtin-getter-name.html b/LayoutTests/js/dom/builtin-getter-name.html
index 75cf3a0..71b379c 100644
--- a/LayoutTests/js/dom/builtin-getter-name.html
+++ b/LayoutTests/js/dom/builtin-getter-name.html
@@ -47,10 +47,11 @@
 }, 'ReadableStreamBYOBReader property names');
 
 test(() => {
-    tryGetOwnPropertyDescriptorGetName(WritableStream.prototype, 'closed', 'get closed');
-    tryGetOwnPropertyDescriptorGetName(WritableStream.prototype, 'ready', 'get ready');
-    tryGetOwnPropertyDescriptorGetName(WritableStream.prototype, 'state', 'get state');
-}, 'WritableStream property names');
+    let stream = new WritableStream();
+    let writer = stream.getWriter();
+    tryGetOwnPropertyDescriptorGetName(writer.__proto__, 'closed', 'get closed');
+    tryGetOwnPropertyDescriptorGetName(writer.__proto__, 'ready', 'get ready');
+}, 'WritableStreamDefaultWriter property names');
 
 </script>
 </body>
diff --git a/LayoutTests/platform/win/TestExpectations b/LayoutTests/platform/win/TestExpectations
index e660234..fe16b60 100644
--- a/LayoutTests/platform/win/TestExpectations
+++ b/LayoutTests/platform/win/TestExpectations
@@ -3588,7 +3588,6 @@
 streams/reference-implementation/pipe-through.html [ Failure ]
 streams/reference-implementation/pipe-to-options.html [ Failure ]
 streams/reference-implementation/readable-stream-templated.html [ Failure ]
-streams/reference-implementation/writable-stream-abort.html [ Failure ]
 streams/reference-implementation/writable-stream.html [ Failure ]
 streams/shadowing-Promise.html [ Failure ]
 svg/animations/animated-svg-image-removed-from-document-paused.html [ Failure ]
diff --git a/LayoutTests/streams/pipe-to-expected.txt b/LayoutTests/streams/pipe-to-expected.txt
index 0dcb693..22ee454 100644
--- a/LayoutTests/streams/pipe-to-expected.txt
+++ b/LayoutTests/streams/pipe-to-expected.txt
@@ -1,3 +1,3 @@
 
-PASS Piping to a writable stream that does not consume the writes fast enough exerts backpressure on the source 
+FAIL Piping to a writable stream that does not consume the writes fast enough exerts backpressure on the source |this| is not a Promise
 
diff --git a/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt b/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt
index 219f383..f0060d5 100644
--- a/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt
+++ b/LayoutTests/streams/reference-implementation/bad-strategies-expected.txt
@@ -1,7 +1,7 @@
 
 PASS Writable stream: throwing strategy.size getter 
-PASS Writable stream: throwing strategy.size method 
-PASS Writable stream: invalid strategy.size return value 
+FAIL Writable stream: throwing strategy.size method ws.write is not a function. (In 'ws.write('a')', 'ws.write' is undefined)
+FAIL Writable stream: invalid strategy.size return value ws.write is not a function. (In 'ws.write('a')', 'ws.write' is undefined)
 PASS Writable stream: throwing strategy.highWaterMark getter 
 PASS Writable stream: invalid strategy.highWaterMark 
 
diff --git a/LayoutTests/streams/reference-implementation/bad-underlying-sinks-expected.txt b/LayoutTests/streams/reference-implementation/bad-underlying-sinks-expected.txt
index e88afe3..409f43a 100644
--- a/LayoutTests/streams/reference-implementation/bad-underlying-sinks-expected.txt
+++ b/LayoutTests/streams/reference-implementation/bad-underlying-sinks-expected.txt
@@ -1,10 +1,10 @@
 
 PASS Underlying sink: throwing start getter 
 PASS Underlying sink: throwing start method 
-PASS Underlying sink: throwing write getter 
-PASS Underlying sink: throwing write method 
-PASS Underlying sink: throwing abort getter 
-PASS Underlying sink: throwing abort method 
-PASS Underlying sink: throwing close getter 
+FAIL Underlying sink: throwing write getter a unique string
+FAIL Underlying sink: throwing write method ws.write is not a function. (In 'ws.write('a')', 'ws.write' is undefined)
+FAIL Underlying sink: throwing abort getter a unique string
+FAIL Underlying sink: throwing abort method undefined is not an object (evaluating 'ws.closed.then')
+FAIL Underlying sink: throwing close getter a unique string
 PASS Underlying sink: throwing close method 
 
diff --git a/LayoutTests/streams/reference-implementation/brand-checks-expected.txt b/LayoutTests/streams/reference-implementation/brand-checks-expected.txt
index 612622f..b7a0801 100644
--- a/LayoutTests/streams/reference-implementation/brand-checks-expected.txt
+++ b/LayoutTests/streams/reference-implementation/brand-checks-expected.txt
@@ -1,8 +1,8 @@
 
-PASS WritableStream.prototype.closed enforces a brand check 
-PASS WritableStream.prototype.ready enforces a brand check 
-PASS WritableStream.prototype.state enforces a brand check 
+FAIL WritableStream.prototype.closed enforces a brand check undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, getterName).get')
+FAIL WritableStream.prototype.ready enforces a brand check undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, getterName).get')
+FAIL WritableStream.prototype.state enforces a brand check undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, getterName).get')
 PASS WritableStream.prototype.abort enforces a brand check 
-PASS WritableStream.prototype.write enforces a brand check 
+FAIL WritableStream.prototype.write enforces a brand check undefined is not an object (evaluating 'method.call')
 PASS WritableStream.prototype.close enforces a brand check 
 
diff --git a/LayoutTests/streams/reference-implementation/byte-length-queuing-strategy-expected.txt b/LayoutTests/streams/reference-implementation/byte-length-queuing-strategy-expected.txt
index 5b1fc91..789ea77 100644
--- a/LayoutTests/streams/reference-implementation/byte-length-queuing-strategy-expected.txt
+++ b/LayoutTests/streams/reference-implementation/byte-length-queuing-strategy-expected.txt
@@ -1,3 +1,3 @@
 
-PASS Closing a writable stream with in-flight writes below the high water mark delays the close call properly 
+FAIL Closing a writable stream with in-flight writes below the high water mark delays the close call properly ws.write is not a function. (In 'ws.write({ byteLength: 1024 })', 'ws.write' is undefined)
 
diff --git a/LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt b/LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt
index 9457d6f..3e28da1 100644
--- a/LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt
+++ b/LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt
@@ -1,5 +1,5 @@
 
 PASS Can construct a writable stream with a valid CountQueuingStrategy 
-PASS Correctly governs the value of a WritableStream's state property (HWM = 0) 
-PASS Correctly governs the value of a WritableStream's state property (HWM = 4) 
+FAIL Correctly governs the value of a WritableStream's state property (HWM = 0) assert_equals: After 0 writes, 0 of which finished, state should be 'writable' expected (string) "writable" but got (undefined) undefined
+FAIL Correctly governs the value of a WritableStream's state property (HWM = 4) assert_equals: After 0 writes, 0 of which finished, state should be 'writable' expected (string) "writable" but got (undefined) undefined
 
diff --git a/LayoutTests/streams/reference-implementation/pipe-through-expected.txt b/LayoutTests/streams/reference-implementation/pipe-through-expected.txt
index 9027eaa..6ea0dd4 100644
--- a/LayoutTests/streams/reference-implementation/pipe-through-expected.txt
+++ b/LayoutTests/streams/reference-implementation/pipe-through-expected.txt
@@ -1,4 +1,4 @@
 
-PASS Piping through a duck-typed pass-through transform stream works 
+FAIL Piping through a duck-typed pass-through transform stream works |this| is not a Promise
 FAIL Piping through an identity transform stream will close the destination when the source closes Can't find variable: TransformStream
 
diff --git a/LayoutTests/streams/reference-implementation/pipe-to-expected.txt b/LayoutTests/streams/reference-implementation/pipe-to-expected.txt
index 912bf2e..b00224b 100644
--- a/LayoutTests/streams/reference-implementation/pipe-to-expected.txt
+++ b/LayoutTests/streams/reference-implementation/pipe-to-expected.txt
@@ -1,49 +1,29 @@
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.message')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: horrible things
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: horrible things
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.message')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.message')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.message')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: horrible things
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: horrible things
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: horrible things
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancel() called on a reader owned by no readable stream
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: I don't like you.
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: I don't like you.
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: I don't like you.
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: I don't like you.
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: I don't like you.
+CONSOLE MESSAGE: Unhandled Promise Rejection: Error: assert_unreached: Unexpected pull call Reached unreachable code
+CONSOLE MESSAGE: Unhandled Promise Rejection: Error: assert_equals: underlying sink abort should receive the error from the readable stream expected (object) object "Error: horrible things" but got (undefined) undefined
 
-Harness Error (FAIL), message = I don't like you.
+Harness Error (FAIL), message = assert_equals: underlying sink abort should receive the error from the readable stream expected (object) object "Error: horrible things" but got (undefined) undefined
 
-PASS Piping from a ReadableStream from which lots of data are readable synchronously 
-PASS Piping from a ReadableStream in readable state to a WritableStream in closing state 
-PASS Piping from a ReadableStream in readable state to a WritableStream in errored state 
-PASS Piping from a ReadableStream in the readable state which becomes closed after pipeTo call to a WritableStream in the writable state 
-PASS Piping from a ReadableStream in the readable state which becomes errored after pipeTo call to a WritableStream in the writable state 
-PASS Piping from an empty ReadableStream which becomes non-empty after pipeTo call to a WritableStream in the writable state 
-PASS Piping from an empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the writable state 
-PASS Piping from an empty ReadableStream to a WritableStream in the writable state which becomes errored after a pipeTo call 
-PASS Piping from a non-empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call 
-PASS Piping from a non-empty ReadableStream to a WritableStream in waiting state which becomes errored after a pipeTo call 
-PASS Piping from a non-empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the waiting state 
-PASS Piping from a non-empty ReadableStream to a WritableStream in the waiting state where both become ready after a pipeTo 
-PASS Piping from an empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call 
-PASS Piping from an empty ReadableStream which becomes closed after a pipeTo call to a WritableStream in the waiting state whose writes never complete 
-PASS Piping from an empty ReadableStream which becomes errored after a pipeTo call to a WritableStream in the waiting state 
+FAIL Piping from a ReadableStream from which lots of data are readable synchronously assert_equals: writable stream state should start out writable expected (string) "writable" but got (undefined) undefined
+FAIL Piping from a ReadableStream in readable state to a WritableStream in closing state assert_equals: writable stream should be closing immediately after closing it expected (string) "closing" but got (undefined) undefined
+FAIL Piping from a ReadableStream in readable state to a WritableStream in errored state ws.write is not a function. (In 'ws.write('Hello')', 'ws.write' is undefined)
+FAIL Piping from a ReadableStream in the readable state which becomes closed after pipeTo call to a WritableStream in the writable state |this| is not a Promise
+FAIL Piping from a ReadableStream in the readable state which becomes errored after pipeTo call to a WritableStream in the writable state |this| is not a Promise
+FAIL Piping from an empty ReadableStream which becomes non-empty after pipeTo call to a WritableStream in the writable state |this| is not a Promise
+FAIL Piping from an empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the writable state |this| is not a Promise
+FAIL Piping from an empty ReadableStream to a WritableStream in the writable state which becomes errored after a pipeTo call assert_equals: ws should start writable expected (string) "writable" but got (undefined) undefined
+FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call ws.write is not a function. (In 'ws.write('Hello')', 'ws.write' is undefined)
+FAIL Piping from a non-empty ReadableStream to a WritableStream in waiting state which becomes errored after a pipeTo call ws.write is not a function. (In 'ws.write('Hello')', 'ws.write' is undefined)
+FAIL Piping from a non-empty ReadableStream which becomes errored after pipeTo call to a WritableStream in the waiting state ws.write is not a function. (In 'ws.write('Hello')', 'ws.write' is undefined)
+FAIL Piping from a non-empty ReadableStream to a WritableStream in the waiting state where both become ready after a pipeTo ws.write is not a function. (In 'ws.write('Hello')', 'ws.write' is undefined)
+FAIL Piping from an empty ReadableStream to a WritableStream in the waiting state which becomes writable after a pipeTo call ws.write is not a function. (In 'ws.write('Hello')', 'ws.write' is undefined)
+FAIL Piping from an empty ReadableStream which becomes closed after a pipeTo call to a WritableStream in the waiting state whose writes never complete ws.write is not a function. (In 'ws.write('Hello')', 'ws.write' is undefined)
+FAIL Piping from an empty ReadableStream which becomes errored after a pipeTo call to a WritableStream in the waiting state ws.write is not a function. (In 'ws.write('Hello')', 'ws.write' is undefined)
 PASS Piping to a duck-typed asynchronous "writable stream" works 
-PASS Piping to a stream that has been aborted passes through the error as the cancellation reason 
-PASS Piping to a stream and then aborting it passes through the error as the cancellation reason 
-PASS Piping to a stream that has been closed propagates a TypeError cancellation reason backward 
-PASS Piping to a stream and then closing it propagates a TypeError cancellation reason backward 
-PASS Piping to a stream that errors on write should pass through the error as the cancellation reason 
-PASS Piping to a stream that errors on write should not pass through the error if the stream is already closed 
-PASS Piping to a stream that errors soon after writing should pass through the error as the cancellation reason 
+FAIL Piping to a stream that has been aborted passes through the error as the cancellation reason |this| is not a Promise
+FAIL Piping to a stream and then aborting it passes through the error as the cancellation reason |this| is not a Promise
+FAIL Piping to a stream that has been closed propagates a TypeError cancellation reason backward |this| is not a Promise
+FAIL Piping to a stream and then closing it propagates a TypeError cancellation reason backward |this| is not a Promise
+FAIL Piping to a stream that errors on write should pass through the error as the cancellation reason |this| is not a Promise
+FAIL Piping to a stream that errors on write should not pass through the error if the stream is already closed |this| is not a Promise
+FAIL Piping to a stream that errors soon after writing should pass through the error as the cancellation reason |this| is not a Promise
 
diff --git a/LayoutTests/streams/reference-implementation/pipe-to-options-expected.txt b/LayoutTests/streams/reference-implementation/pipe-to-options-expected.txt
index 6888574..ecc291d 100644
--- a/LayoutTests/streams/reference-implementation/pipe-to-options-expected.txt
+++ b/LayoutTests/streams/reference-implementation/pipe-to-options-expected.txt
@@ -1,11 +1,5 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: destination error
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: destination error
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: destination error
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: destination error
 
-Harness Error (FAIL), message = destination error
-
-PASS Piping with no options and a destination error 
-PASS Piping with { preventCancel: false } and a destination error 
-PASS Piping with { preventCancel: true } and a destination error 
+FAIL Piping with no options and a destination error |this| is not a Promise
+FAIL Piping with { preventCancel: false } and a destination error |this| is not a Promise
+FAIL Piping with { preventCancel: true } and a destination error |this| is not a Promise
 
diff --git a/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt b/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt
index e907a1e..ea951b3 100644
--- a/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt
+++ b/LayoutTests/streams/reference-implementation/readable-stream-templated-expected.txt
@@ -1,37 +1,37 @@
 
 PASS Running templatedRSClosed with ReadableStream (closed via call in start) 
-PASS ReadableStream (closed via call in start): piping to a WritableStream in the writable state should close the writable stream 
-PASS ReadableStream (closed via call in start): piping to a WritableStream in the writable state with { preventClose: true } should do nothing 
+FAIL ReadableStream (closed via call in start): piping to a WritableStream in the writable state should close the writable stream assert_equals: writable stream should start in writable state expected (string) "writable" but got (undefined) undefined
+FAIL ReadableStream (closed via call in start): piping to a WritableStream in the writable state with { preventClose: true } should do nothing assert_equals: writable stream should start in writable state expected (string) "writable" but got (undefined) undefined
 PASS Running templatedRSClosed with ReadableStream (closed via cancel) 
-PASS ReadableStream (closed via cancel): piping to a WritableStream in the writable state should close the writable stream 
-PASS ReadableStream (closed via cancel): piping to a WritableStream in the writable state with { preventClose: true } should do nothing 
+FAIL ReadableStream (closed via cancel): piping to a WritableStream in the writable state should close the writable stream assert_equals: writable stream should start in writable state expected (string) "writable" but got (undefined) undefined
+FAIL ReadableStream (closed via cancel): piping to a WritableStream in the writable state with { preventClose: true } should do nothing assert_equals: writable stream should start in writable state expected (string) "writable" but got (undefined) undefined
 PASS Running templatedRSErrored with ReadableStream (errored via call in start) 
-PASS ReadableStream (errored via call in start): piping to a WritableStream in the writable state should abort the writable stream 
+FAIL ReadableStream (errored via call in start): piping to a WritableStream in the writable state should abort the writable stream assert_equals: expected (string) "writable" but got (undefined) undefined
 PASS Running templatedRSErrored with ReadableStream (errored via returning a rejected promise in start) 
-PASS ReadableStream (errored via returning a rejected promise in start): piping to a WritableStream in the writable state should abort the writable stream 
+FAIL ReadableStream (errored via returning a rejected promise in start): piping to a WritableStream in the writable state should abort the writable stream assert_equals: expected (string) "writable" but got (undefined) undefined
 PASS Running templatedRSErroredAsyncOnly with ReadableStream (errored via returning a rejected promise in start) reader 
-PASS ReadableStream (errored via returning a rejected promise in start) reader: piping with no options 
-PASS ReadableStream (errored via returning a rejected promise in start) reader: piping with { preventAbort: false } 
-PASS ReadableStream (errored via returning a rejected promise in start) reader: piping with { preventAbort: true } 
+FAIL ReadableStream (errored via returning a rejected promise in start) reader: piping with no options |this| is not a Promise
+FAIL ReadableStream (errored via returning a rejected promise in start) reader: piping with { preventAbort: false } |this| is not a Promise
+FAIL ReadableStream (errored via returning a rejected promise in start) reader: piping with { preventAbort: true } |this| is not a Promise
 PASS Running templatedRSTwoChunksClosed with ReadableStream (two chunks enqueued, then closed) 
-PASS ReadableStream (two chunks enqueued, then closed): piping with no options and no destination errors 
-PASS ReadableStream (two chunks enqueued, then closed): piping with { preventClose: false } and no destination errors 
-PASS ReadableStream (two chunks enqueued, then closed): piping with { preventClose: true } and no destination errors 
-PASS ReadableStream (two chunks enqueued, then closed): piping with { preventClose: false } and a destination with that errors synchronously 
-PASS ReadableStream (two chunks enqueued, then closed): piping with { preventClose: true } and a destination with that errors synchronously 
-PASS ReadableStream (two chunks enqueued, then closed): piping with { preventClose: true } and a destination that errors on the last chunk 
+FAIL ReadableStream (two chunks enqueued, then closed): piping with no options and no destination errors |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued, then closed): piping with { preventClose: false } and no destination errors |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued, then closed): piping with { preventClose: true } and no destination errors |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued, then closed): piping with { preventClose: false } and a destination with that errors synchronously |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued, then closed): piping with { preventClose: true } and a destination with that errors synchronously |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued, then closed): piping with { preventClose: true } and a destination that errors on the last chunk |this| is not a Promise
 PASS Running templatedRSTwoChunksClosed with ReadableStream (two chunks enqueued async, then closed) 
-PASS ReadableStream (two chunks enqueued async, then closed): piping with no options and no destination errors 
-PASS ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: false } and no destination errors 
-PASS ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: true } and no destination errors 
-PASS ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: false } and a destination with that errors synchronously 
-PASS ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: true } and a destination with that errors synchronously 
-PASS ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: true } and a destination that errors on the last chunk 
+FAIL ReadableStream (two chunks enqueued async, then closed): piping with no options and no destination errors |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: false } and no destination errors |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: true } and no destination errors |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: false } and a destination with that errors synchronously |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: true } and a destination with that errors synchronously |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued async, then closed): piping with { preventClose: true } and a destination that errors on the last chunk |this| is not a Promise
 PASS Running templatedRSTwoChunksClosed with ReadableStream (two chunks enqueued via pull, then closed) 
-PASS ReadableStream (two chunks enqueued via pull, then closed): piping with no options and no destination errors 
-PASS ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: false } and no destination errors 
-PASS ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: true } and no destination errors 
-PASS ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: false } and a destination with that errors synchronously 
-PASS ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: true } and a destination with that errors synchronously 
-PASS ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: true } and a destination that errors on the last chunk 
+FAIL ReadableStream (two chunks enqueued via pull, then closed): piping with no options and no destination errors |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: false } and no destination errors |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: true } and no destination errors |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: false } and a destination with that errors synchronously |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: true } and a destination with that errors synchronously |this| is not a Promise
+FAIL ReadableStream (two chunks enqueued via pull, then closed): piping with { preventClose: true } and a destination that errors on the last chunk |this| is not a Promise
 
diff --git a/LayoutTests/streams/reference-implementation/writable-stream-abort-expected.txt b/LayoutTests/streams/reference-implementation/writable-stream-abort-expected.txt
deleted file mode 100644
index cbcd7e9..0000000
--- a/LayoutTests/streams/reference-implementation/writable-stream-abort-expected.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: a
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: Sorry, it just wasn't meant to be.
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: Sorry, it just wasn't meant to be.
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: Sorry, it just wasn't meant to be.
-CONSOLE MESSAGE: Unhandled Promise Rejection: Error: Sorry, it just wasn't meant to be.
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
-
-Harness Error (FAIL), message = TypeError: undefined is not an object (evaluating 'e.error')
-
-PASS Aborting a WritableStream immediately prevents future writes 
-PASS Aborting a WritableStream prevents further writes after any that are in progress 
-PASS Fulfillment value of ws.abort() call must be undefined even if the underlying sink returns a non-undefined value 
-PASS WritableStream if sink's abort throws, the promise returned by ws.abort() rejects 
-PASS Aborting a WritableStream passes through the given reason 
-PASS Aborting a WritableStream puts it in an errored state, with stored error equal to the abort reason 
-PASS Aborting a WritableStream causes any outstanding ready promises to be fulfilled immediately 
-PASS Aborting a WritableStream causes any outstanding write() promises to be rejected with the abort reason 
-PASS Closing but then immediately aborting a WritableStream causes the stream to error 
-PASS Closing a WritableStream and aborting it while it closes causes the stream to error 
-PASS Aborting a WritableStream after it is closed is a no-op 
-PASS WritableStream should call underlying sink's close if no abort is supplied 
-
diff --git a/LayoutTests/streams/reference-implementation/writable-stream-abort.html b/LayoutTests/streams/reference-implementation/writable-stream-abort.html
deleted file mode 100644
index 0120b81..0000000
--- a/LayoutTests/streams/reference-implementation/writable-stream-abort.html
+++ /dev/null
@@ -1,264 +0,0 @@
-<!DOCTYPE html>
-<script src='../../resources/testharness.js'></script>
-<script src='../../resources/testharnessreport.js'></script>
-<script src='resources/streams-utils.js'></script>
-<script>
-// This is updated till https://github.com/whatwg/streams/commit/4ba861e6f60c248060811830e11271c84b439cc3
-
-var test1 = async_test('Aborting a WritableStream immediately prevents future writes');
-test1.step(function() {
-    var chunks = [];
-    var ws = new WritableStream({
-        write: function(chunk) {
-            chunks.push(chunk);
-        }
-    });
-
-    setTimeout(test1.step_func(function() {
-        ws.abort();
-        ws.write(1);
-        ws.write(2);
-        assert_array_equals(chunks, [], 'no chunks are written');
-        test1.done();
-    }), 0);
-});
-
-var test2 = async_test('Aborting a WritableStream prevents further writes after any that are in progress');
-test2.step(function() {
-    var chunks = [];
-    var ws = new WritableStream({
-        write: function(chunk) {
-            chunks.push(chunk);
-            return new Promise(test2.step_func(function(resolve) { setTimeout(test2.step_func(function() { resolve(); }), 200); }));
-        }
-    });
-
-    setTimeout(test2.step_func(function() {
-        ws.write(1);
-        ws.write(2);
-        ws.write(3);
-        ws.abort();
-        ws.write(4);
-        ws.write(5);
-
-        setTimeout(test2.step_func(function () {
-            assert_array_equals(chunks, [1], 'only the single in-progress chunk gets written');
-            test2.done();
-        }), 500);
-    }), 0);
-});
-
-var test3 = async_test('Fulfillment value of ws.abort() call must be undefined even if the underlying sink returns a non-undefined value');
-test3.step(function() {
-    var ws = new WritableStream({
-        abort: function() {
-            return 'Hello';
-        }
-    });
-
-    var abortPromise = ws.abort('a');
-    abortPromise.then(test3.step_func(function(value) {
-        assert_equals(value, undefined, 'fulfillment value must be undefined');
-        test3.done();
-    })).catch(test3.step_func(function() { assert_unreached('abortPromise is rejected'); }));
-});
-
-var test4 = async_test('WritableStream if sink\'s abort throws, the promise returned by ws.abort() rejects');
-test4.step(function() {
-    var errorInSinkAbort = new Error('Sorry, it just wasn\'t meant to be.');
-    var ws = new WritableStream({
-        abort: function() {
-            throw errorInSinkAbort;
-        }
-    });
-
-    var abortPromise = ws.abort(undefined);
-    abortPromise.then(
-        test4.step_func(function() { assert_unreached('abortPromise is fulfilled unexpectedly'); }),
-        test4.step_func(function(r) {
-            assert_equals(r, errorInSinkAbort, 'rejection reason of abortPromise must be errorInSinkAbort');
-            test4.done();
-        })
-    );
-});
-
-test(function() {
-    var recordedReason;
-    var ws = new WritableStream({
-        abort: function(reason) {
-            recordedReason = reason;
-        }
-    });
-
-    var passedReason = new Error('Sorry, it just wasn\'t meant to be.');
-    ws.abort(passedReason);
-
-    assert_equals(recordedReason, passedReason);
-}, 'Aborting a WritableStream passes through the given reason');
-
-var test5 = async_test('Aborting a WritableStream puts it in an errored state, with stored error equal to the abort reason');
-test5.step(function() {
-    var events = 0;
-    var recordedReason;
-    var ws = new WritableStream();
-
-    var passedReason = new Error('Sorry, it just wasn\'t meant to be.');
-    ws.abort(passedReason);
-
-    assert_equals(ws.state, 'errored', 'state should be errored');
-
-    ws.write().then(
-        test5.step_func(function() { assert_unreached('writing should not succeed'); }),
-        test5.step_func(function(r) {
-            assert_equals(r, passedReason, 'writing should reject with the given reason');
-            assert_equals(++events, 1);
-        })
-    );
-
-    ws.close().then(
-        test5.step_func(function() { assert_unreached('closing should not succeed'); }),
-        test5.step_func(function(r) {
-            assert_equals(r, passedReason, 'closing should reject with the given reason');
-            assert_equals(++events, 2);
-        })
-    );
-
-    ws.abort().then(
-        test5.step_func(function() { assert_unreached('aborting a second time should not succeed'); }),
-        test5.step_func(function(r) {
-            assert_equals(r, passedReason, 'aborting a second time should reject with the given reason');
-            assert_equals(++events, 3);
-        })
-    );
-
-    ws.closed.then(
-        test5.step_func(function() { assert_unreached('closed promise should not be fulfilled'); }),
-        test5.step_func(function(r) {
-            assert_equals(r, passedReason, 'closed promise should be rejected with the given reason');
-            assert_equals(++events, 4);
-            test5.done();
-        })
-    );
-});
-
-var test6 = async_test('Aborting a WritableStream causes any outstanding ready promises to be fulfilled immediately');
-test6.step(function() {
-    var writeCalled = false;
-    var recordedReason;
-    var ws = new WritableStream({
-        write: function(chunk) {
-            writeCalled = true;
-            return new Promise(test6.step_func(function() { })); // forever-pending, so normally .ready would not fulfill.
-        }
-    });
-    ws.write('a');
-    assert_equals(ws.state, 'waiting', 'state should be waiting');
-
-    ws.ready.then(test6.step_func(function() {
-        assert_equals(ws.state, 'errored', 'state should now be errored');
-        assert_false(writeCalled);
-        test6.done();
-    }));
-
-    var passedReason = new Error('Sorry, it just wasn\'t meant to be.');
-    ws.abort(passedReason);
-});
-
-var test7 = async_test('Aborting a WritableStream causes any outstanding write() promises to be rejected with the abort reason');
-test7.step(function() {
-    var ws = new WritableStream();
-
-    ws.write('a').then(
-        test7.step_func(function() { assert_unreached('writing should not succeed'); }),
-        test7.step_func(function(r) {
-            assert_equals(r, passedReason, 'writing should reject with the given reason');
-            test7.done();
-        })
-    );
-
-    var passedReason = new Error('Sorry, it just wasn\'t meant to be.');
-    ws.abort(passedReason);
-});
-
-var test8 = async_test('Closing but then immediately aborting a WritableStream causes the stream to error');
-test8.step(function() {
-    var ws = new WritableStream();
-
-    ws.close();
-
-    var passedReason = new Error('Sorry, it just wasn\'t meant to be.');
-    ws.abort(passedReason);
-
-    assert_equals(ws.state, 'errored');
-
-    ws.closed.then(
-        test8.step_func(function() { assert_unreached('the stream should not close successfully'); }),
-        test8.step_func(function(r) {
-            assert_equals(r, passedReason, 'the stream should be errored with the given reason');
-            test8.done();
-        })
-    );
-});
-
-var test9 = async_test('Closing a WritableStream and aborting it while it closes causes the stream to error');
-test9.step(function() {
-    var ws = new WritableStream({
-        close: function() {
-            return new Promise(test9.step_func(function() { })); // forever-pending
-        }
-    });
-
-    ws.close();
-
-    var passedReason = new Error('Sorry, it just wasn\'t meant to be.');
-
-    setTimeout(test9.step_func(function() {
-        assert_equals(ws.state, 'closing');
-
-        ws.abort(passedReason);
-
-        assert_equals(ws.state, 'errored');
-    }), 200);
-
-    ws.closed.then(
-        test9.step_func(function() { assert_unreached('the stream should not close successfully'); }),
-        test9.step_func(function(r) {
-            assert_equals(r, passedReason, 'the stream should be errored with the given reason');
-            test9.done();
-        })
-    );
-});
-
-var test10 = async_test('Aborting a WritableStream after it is closed is a no-op');
-test10.step(function() {
-    var ws = new WritableStream();
-
-    ws.close();
-
-    setTimeout(test10.step_func(function() {
-        assert_equals(ws.state, 'closed');
-
-        ws.abort().then(
-            test10.step_func(function(v) {
-                assert_equals(v, undefined, 'abort promise should fulfill with undefined');
-                test10.done();
-            }),
-            test10.step_func(assert_unreached)
-        );
-
-        assert_equals(ws.state, 'closed', 'state stays closed');
-    }), 0);
-});
-
-var test11 = async_test('WritableStream should call underlying sink\'s close if no abort is supplied');
-test11.step(function() {
-    var ws = new WritableStream({
-        close: function() {
-            assert_equals(arguments.length, 0, 'close() was called (with no arguments)');
-            test11.done();
-        }
-    });
-
-    ws.abort();
-});
-</script>
diff --git a/LayoutTests/streams/reference-implementation/writable-stream-expected.txt b/LayoutTests/streams/reference-implementation/writable-stream-expected.txt
index 160b5f5..42fe2bd 100644
--- a/LayoutTests/streams/reference-implementation/writable-stream-expected.txt
+++ b/LayoutTests/streams/reference-implementation/writable-stream-expected.txt
@@ -1,18 +1,14 @@
-CONSOLE MESSAGE: TypeError: undefined is not an object (evaluating 'e.error')
-CONSOLE MESSAGE: Unhandled Promise Rejection: undefined
 
-Harness Error (FAIL), message = TypeError: undefined is not an object (evaluating 'e.error')
-
-PASS error argument is given to start method 
-PASS Underlying sink's write won't be called until start finishes 
-PASS Underlying sink's close won't be called until start finishes 
+FAIL error argument is given to start method error is not a function. (In 'error(passedError)', 'error' is an instance of WritableStreamDefaultController)
+FAIL Underlying sink's write won't be called until start finishes ws.write is not a function. (In 'ws.write('a')', 'ws.write' is undefined)
+FAIL Underlying sink's close won't be called until start finishes assert_equals: expected (string) "closing" but got (undefined) undefined
 PASS Fulfillment value of ws.close() call must be undefined even if the underlying sink returns a non-undefined value 
 PASS Underlying sink's write or close are never invoked if start throws 
 PASS Underlying sink's write or close are never invoked if the promise returned by start is rejected 
 PASS WritableStream can be constructed with no arguments 
-PASS WritableStream instances have the correct methods and properties 
-PASS WritableStream with simple input, processed asynchronously 
-PASS WritableStream with simple input, processed synchronously 
-PASS WritableStream is writable and ready fulfills immediately if the strategy does not apply backpressure 
-PASS Fulfillment value of ws.write() call must be undefined even if the underlying sink returns a non-undefined value 
+FAIL WritableStream instances have the correct methods and properties assert_equals: has a write method expected "function" but got "undefined"
+FAIL WritableStream with simple input, processed asynchronously writableStream.write is not a function. (In 'writableStream.write(chunk)', 'writableStream.write' is undefined)
+FAIL WritableStream with simple input, processed synchronously writableStream.write is not a function. (In 'writableStream.write(chunk)', 'writableStream.write' is undefined)
+FAIL WritableStream is writable and ready fulfills immediately if the strategy does not apply backpressure assert_equals: expected (string) "writable" but got (undefined) undefined
+FAIL Fulfillment value of ws.write() call must be undefined even if the underlying sink returns a non-undefined value ws.write is not a function. (In 'ws.write('a')', 'ws.write' is undefined)
 
diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt
index ec5436b..1f4b0fc 100644
--- a/Source/WebCore/CMakeLists.txt
+++ b/Source/WebCore/CMakeLists.txt
@@ -444,6 +444,8 @@
     Modules/streams/ReadableStreamSink.idl
     Modules/streams/ReadableStreamSource.idl
     Modules/streams/WritableStream.idl
+    Modules/streams/WritableStreamDefaultController.idl
+    Modules/streams/WritableStreamDefaultWriter.idl
 
     Modules/webaudio/AnalyserNode.idl
     Modules/webaudio/AnalyserOptions.idl
@@ -1934,6 +1936,8 @@
     ${WEBCORE_DIR}/Modules/streams/ReadableStreamDefaultReader.js
     ${WEBCORE_DIR}/Modules/streams/StreamInternals.js
     ${WEBCORE_DIR}/Modules/streams/WritableStream.js
+    ${WEBCORE_DIR}/Modules/streams/WritableStreamDefaultController.js
+    ${WEBCORE_DIR}/Modules/streams/WritableStreamDefaultWriter.js
     ${WEBCORE_DIR}/Modules/streams/WritableStreamInternals.js
     ${WEBCORE_DIR}/bindings/js/JSDOMBindingInternals.js
 )
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index e000475..f077078 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2020-08-12  Youenn Fablet  <youenn@apple.com>
+
+        Refresh WritableStream up to spec
+        https://bugs.webkit.org/show_bug.cgi?id=215267
+
+        Reviewed by Geoff Garen.
+
+        Update according latest spec, including WebIDL, controller and writer.
+        Covered by rebased tests.
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources-output.xcfilelist:
+        * DerivedSources.make:
+        * Modules/streams/StreamInternals.js:
+        * Modules/streams/WritableStream.idl:
+        * Modules/streams/WritableStream.js:
+        * Modules/streams/WritableStreamDefaultController.idl: Added.
+        * Modules/streams/WritableStreamDefaultController.js: Added.
+        * Modules/streams/WritableStreamDefaultWriter.idl: Added.
+        * Modules/streams/WritableStreamDefaultWriter.js: Added.
+        * Modules/streams/WritableStreamInternals.js:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/WebCoreBuiltinNames.h:
+
 2020-08-06  Sergio Villar Senin  <svillar@igalia.com>
 
         [WebXR] Update WebXR WPT directory
diff --git a/Source/WebCore/DerivedSources-input.xcfilelist b/Source/WebCore/DerivedSources-input.xcfilelist
index dbadcdd..f5311cc 100644
--- a/Source/WebCore/DerivedSources-input.xcfilelist
+++ b/Source/WebCore/DerivedSources-input.xcfilelist
@@ -293,6 +293,10 @@
 $(PROJECT_DIR)/Modules/streams/StreamInternals.js
 $(PROJECT_DIR)/Modules/streams/WritableStream.idl
 $(PROJECT_DIR)/Modules/streams/WritableStream.js
+$(PROJECT_DIR)/Modules/streams/WritableStreamDefaultController.idl
+$(PROJECT_DIR)/Modules/streams/WritableStreamDefaultController.js
+$(PROJECT_DIR)/Modules/streams/WritableStreamDefaultWriter.idl
+$(PROJECT_DIR)/Modules/streams/WritableStreamDefaultWriter.js
 $(PROJECT_DIR)/Modules/streams/WritableStreamInternals.js
 $(PROJECT_DIR)/Modules/webaudio/AnalyserNode.idl
 $(PROJECT_DIR)/Modules/webaudio/AnalyserOptions.idl
diff --git a/Source/WebCore/DerivedSources-output.xcfilelist b/Source/WebCore/DerivedSources-output.xcfilelist
index f9b4377..b835970 100644
--- a/Source/WebCore/DerivedSources-output.xcfilelist
+++ b/Source/WebCore/DerivedSources-output.xcfilelist
@@ -2248,6 +2248,10 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWorkletGlobalScope.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWritableStream.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWritableStream.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWritableStreamDefaultController.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWritableStreamDefaultController.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWritableStreamDefaultWriter.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWritableStreamDefaultWriter.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSXMLDocument.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSXMLDocument.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSXMLHttpRequest.cpp
@@ -2359,6 +2363,8 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WorkerGlobalScopeConstructors.idl
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WorkletGlobalScopeConstructors.idl
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WritableStreamBuiltins.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WritableStreamDefaultControllerBuiltins.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WritableStreamDefaultWriterBuiltins.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WritableStreamInternalsBuiltins.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/XLinkNames.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/XMLNSNames.cpp
diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make
index 76e9ac7..6136a0c 100644
--- a/Source/WebCore/DerivedSources.make
+++ b/Source/WebCore/DerivedSources.make
@@ -377,6 +377,8 @@
     $(WebCore)/Modules/streams/ReadableStreamSink.idl \
     $(WebCore)/Modules/streams/ReadableStreamSource.idl \
     $(WebCore)/Modules/streams/WritableStream.idl \
+    $(WebCore)/Modules/streams/WritableStreamDefaultController.idl \
+    $(WebCore)/Modules/streams/WritableStreamDefaultWriter.idl \
     $(WebCore)/Modules/webaudio/AnalyserNode.idl \
     $(WebCore)/Modules/webaudio/AnalyserOptions.idl \
     $(WebCore)/Modules/webaudio/AudioBuffer.idl \
@@ -1762,6 +1764,8 @@
     $(WebCore)/Modules/streams/ReadableStreamDefaultReader.js \
     $(WebCore)/Modules/streams/StreamInternals.js \
     $(WebCore)/Modules/streams/WritableStream.js \
+    $(WebCore)/Modules/streams/WritableStreamDefaultController.js \
+    $(WebCore)/Modules/streams/WritableStreamDefaultWriter.js \
     $(WebCore)/Modules/streams/WritableStreamInternals.js \
     $(WebCore)/bindings/js/JSDOMBindingInternals.js \
 #
diff --git a/Source/WebCore/Modules/streams/StreamInternals.js b/Source/WebCore/Modules/streams/StreamInternals.js
index ea316a5..be4414c 100644
--- a/Source/WebCore/Modules/streams/StreamInternals.js
+++ b/Source/WebCore/Modules/streams/StreamInternals.js
@@ -145,3 +145,35 @@
 
     return queue.content[0].value;
 }
+
+function resetQueue(queue)
+{
+    "use strict";
+
+    @assert("content" in queue);
+    @assert("size" in queue);
+    queue.content = [];
+    queue.size = 0;
+}
+
+function extractSizeAlgorithm(strategy)
+{
+    if (!("size" in strategy))
+        return () => 1;
+    const sizeAlgorithm = strategy["size"];
+    if (typeof sizeAlgorithm !== "function")
+        @throwTypeError("strategy.size must be a function");
+
+    return (chunk) => { return sizeAlgorithm(chunk); };
+}
+
+function extractHighWaterMark(strategy, defaultHWM)
+{
+    if (!("highWaterMark" in strategy))
+        return defaultHWM;
+    const highWaterMark = strategy["highWaterMark"];
+    if (@isNaN(highWaterMark) || highWaterMark < 0)
+        @throwRangeError("highWaterMark value is negative or not a number");
+
+    return highWaterMark;
+}
diff --git a/Source/WebCore/Modules/streams/WritableStream.idl b/Source/WebCore/Modules/streams/WritableStream.idl
index 5334728..d9ae669 100644
--- a/Source/WebCore/Modules/streams/WritableStream.idl
+++ b/Source/WebCore/Modules/streams/WritableStream.idl
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2015 Canon Inc.
  * Copyright (C) 2015 Igalia S.L.
+ * Copyright (C) 2020 Apple Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted, provided that the following conditions
@@ -29,15 +30,16 @@
 
 [
     EnabledAtRuntime=WritableStreamAPI,
-    JSBuiltin
+    Exposed=(Window,Worker),
+    JSBuiltin,
+    PrivateIdentifier,
+    PublicIdentifier
 ] interface WritableStream {
-    constructor();
+    constructor(optional object underlyingSink, optional QueuingStrategy strategy);
+
+    readonly attribute boolean locked;
 
     Promise<any> abort(optional any reason);
     Promise<any> close();
-    Promise<any> write(any chunk);
-
-    readonly attribute Promise<boolean> closed;
-    readonly attribute Promise<boolean> ready;
-    readonly attribute DOMString state;
+    WritableStreamDefaultWriter getWriter();
 };
diff --git a/Source/WebCore/Modules/streams/WritableStream.js b/Source/WebCore/Modules/streams/WritableStream.js
index cd88fba..e979d49 100644
--- a/Source/WebCore/Modules/streams/WritableStream.js
+++ b/Source/WebCore/Modules/streams/WritableStream.js
@@ -30,56 +30,59 @@
 
     if (underlyingSink === @undefined)
         underlyingSink = { };
+
     if (strategy === @undefined)
-        strategy = { highWaterMark: 0, size: function() { return 1; } };
+        strategy = { };
 
     if (!@isObject(underlyingSink))
         @throwTypeError("WritableStream constructor takes an object as first argument");
 
-    if (!@isObject(strategy))
-        @throwTypeError("WritableStream constructor takes an object as second argument, if any");
+    if ("type" in underlyingSink)
+        @throwRangeError("Invalid type is specified");
 
+    // Initialize Writable Stream
+    @putByIdDirectPrivate(this, "state", "writable");
+    @putByIdDirectPrivate(this, "storedError", @undefined);
+    @putByIdDirectPrivate(this, "writer", @undefined);
+    @putByIdDirectPrivate(this, "controller", @undefined);
+    @putByIdDirectPrivate(this, "inFlightWriteRequest", @undefined);
+    @putByIdDirectPrivate(this, "closeRequest", @undefined);
+    @putByIdDirectPrivate(this, "inFlightCloseRequest", @undefined);
+    @putByIdDirectPrivate(this, "pendingAbortRequest", @undefined);
+    @putByIdDirectPrivate(this, "writeRequests", []);
+    @putByIdDirectPrivate(this, "backpressure", false);
     @putByIdDirectPrivate(this, "underlyingSink", underlyingSink);
-    @putByIdDirectPrivate(this, "closedPromiseCapability", @newPromiseCapability(@Promise));
-    @putByIdDirectPrivate(this, "readyPromiseCapability", { @promise: @Promise.@resolve() });
-    @putByIdDirectPrivate(this, "queue", @newQueue());
-    @putByIdDirectPrivate(this, "state", @streamWritable);
-    @putByIdDirectPrivate(this, "started", false);
-    @putByIdDirectPrivate(this, "writing", false);
 
-    @putByIdDirectPrivate(this, "strategy", @validateAndNormalizeQueuingStrategy(strategy.size, strategy.highWaterMark));
+    const sizeAlgorithm = @extractSizeAlgorithm(strategy);
+    const highWaterMark = @extractHighWaterMark(strategy, 1);
 
-    @syncWritableStreamStateWithQueue(this);
-
-    const errorFunction = (e) => {
-        @errorWritableStream(this, e);
-    };
-    @putByIdDirectPrivate(this, "startedPromise", @promiseInvokeOrNoopNoCatch(underlyingSink, "start", [errorFunction]));
-    @getByIdDirectPrivate(this, "startedPromise").@then(() => {
-        @putByIdDirectPrivate(this, "started", true);
-        @putByIdDirectPrivate(this, "startedPromise", @undefined);
-    }, errorFunction);
+    @setUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, underlyingSink, highWaterMark, sizeAlgorithm)
 
     return this;
 }
 
+@getter
+function locked()
+{
+    "use strict";
+
+    if (!@isWritableStream(this))
+        throw @makeThisTypeError("WritableStream", "locked");
+
+    return @isWritableStreamLocked(this);
+}
+
 function abort(reason)
 {
     "use strict";
 
     if (!@isWritableStream(this))
-        return @Promise.@reject(@makeTypeError("The WritableStream.abort method can only be used on instances of WritableStream"));
+        return @Promise.@reject(@makeThisTypeError("WritableStream", "abort"));
 
-    const state = @getByIdDirectPrivate(this, "state");
-    if (state === @streamClosed)
-        return @Promise.@resolve();
+    if (@isWritableStreamLocked(this))
+        return @Promise.@reject(@makeTypeError("WritableStream.abort method can only be used on non locked WritableStream"));
 
-    if (state === @streamErrored)
-        return @Promise.@reject(@getByIdDirectPrivate(this, "storedError"));
-
-    @errorWritableStream(this, reason);
-
-    return @promiseInvokeOrFallbackOrNoop(@getByIdDirectPrivate(this, "underlyingSink"), "abort", [reason], "close", []).@then(function() { });
+    return @writableStreamAbort(this, reason);
 }
 
 function close()
@@ -87,107 +90,23 @@
     "use strict";
 
     if (!@isWritableStream(this))
-        return @Promise.@reject(@makeTypeError("The WritableStream.close method can only be used on instances of WritableStream"));
+        return @Promise.@reject(@makeThisTypeError("WritableStream", "close"));
 
-    const state = @getByIdDirectPrivate(this, "state");
-    if (state === @streamClosed || state === @streamClosing)
-        return @Promise.@reject(@makeTypeError("Cannot close a WritableString that is closed or closing"));
+    if (@isWritableStreamLocked(this))
+        return @Promise.@reject(@makeTypeError("WritableStream.close method can only be used on non locked WritableStream"));
 
-    if (state === @streamErrored)
-        return @Promise.@reject(@getByIdDirectPrivate(this, "storedError"));
+    if (@writableStreamCloseQueuedOrInFlight(this))
+        return @Promise.@reject(@makeTypeError("WritableStream.close method can only be used on a being close WritableStream"));
 
-    if (state === @streamWaiting)
-        @getByIdDirectPrivate(this, "readyPromiseCapability").@resolve.@call();
-
-    @putByIdDirectPrivate(this, "state", @streamClosing);
-    @enqueueValueWithSize(@getByIdDirectPrivate(this, "queue"), "close", 0);
-    @callOrScheduleWritableStreamAdvanceQueue(this);
-
-    return @getByIdDirectPrivate(this, "closedPromiseCapability").@promise;
+    return @writableStreamClose(this);
 }
 
-function write(chunk)
+function getWriter()
 {
     "use strict";
 
     if (!@isWritableStream(this))
-        return @Promise.@reject(@makeTypeError("The WritableStream.write method can only be used on instances of WritableStream"));
+        throw @makeThisTypeError("WritableStream", "getWriter");
 
-    const state = @getByIdDirectPrivate(this, "state");
-    if (state === @streamClosed || state === @streamClosing)
-        return @Promise.@reject(@makeTypeError("Cannot write on a WritableString that is closed or closing"));
-
-    if (state === @streamErrored)
-        return @Promise.@reject(this.@storedError);
-
-    @assert(state === @streamWritable || state === @streamWaiting);
-
-    let chunkSize = 1;
-    if (@getByIdDirectPrivate(this, "strategy").size !== @undefined) {
-        try {
-            chunkSize = @getByIdDirectPrivate(this, "strategy").size.@call(@undefined, chunk);
-        } catch(e) {
-            @errorWritableStream(this, e);
-            return @Promise.@reject(e);
-        }
-    }
-
-    const promiseCapability = @newPromiseCapability(@Promise);
-    try {
-        @enqueueValueWithSize(@getByIdDirectPrivate(this, "queue"), { promiseCapability: promiseCapability, chunk: chunk }, chunkSize);
-    } catch (e) {
-        @errorWritableStream(this, e);
-        return @Promise.@reject(e);
-    }
-
-    @syncWritableStreamStateWithQueue(this);
-    @callOrScheduleWritableStreamAdvanceQueue(this);
-
-    return promiseCapability.@promise;
-}
-
-@getter
-function closed()
-{
-    "use strict";
-
-    if (!@isWritableStream(this))
-        return @Promise.@reject(@makeGetterTypeError("WritableStream", "closed"));
-
-    return @getByIdDirectPrivate(this, "closedPromiseCapability").@promise;
-}
-
-@getter
-function ready()
-{
-    "use strict";
-
-    if (!@isWritableStream(this))
-        return @Promise.@reject(@makeGetterTypeError("WritableStream", "ready"));
-
-    return @getByIdDirectPrivate(this, "readyPromiseCapability").@promise;
-}
-
-@getter
-function state()
-{
-    "use strict";
-
-    if (!@isWritableStream(this))
-        @throwTypeError("The WritableStream.state getter can only be used on instances of WritableStream");
-
-    switch(@getByIdDirectPrivate(this, "state")) {
-    case @streamClosed:
-        return "closed";
-    case @streamClosing:
-        return "closing";
-    case @streamErrored:
-        return "errored";
-    case @streamWaiting:
-        return "waiting";
-    case @streamWritable:
-        return "writable";
-    }
-
-    @assert(false);
+    return @acquireWritableStreamDefaultWriter(this);
 }
diff --git a/Source/WebCore/Modules/streams/WritableStreamDefaultController.idl b/Source/WebCore/Modules/streams/WritableStreamDefaultController.idl
new file mode 100644
index 0000000..3b736be
--- /dev/null
+++ b/Source/WebCore/Modules/streams/WritableStreamDefaultController.idl
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    EnabledAtRuntime=WritableStreamAPI,
+    Exposed=(Window,Worker),
+    JSBuiltin,
+    PrivateIdentifier,
+    PublicIdentifier
+] interface WritableStreamDefaultController {
+    void error(optional any e);
+};
diff --git a/Source/WebCore/Modules/streams/WritableStreamDefaultController.js b/Source/WebCore/Modules/streams/WritableStreamDefaultController.js
new file mode 100644
index 0000000..8c42212
--- /dev/null
+++ b/Source/WebCore/Modules/streams/WritableStreamDefaultController.js
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+function initializeWritableStreamDefaultController()
+{
+    "use strict";
+
+    @putByIdDirectPrivate(this, "queue", @newQueue());
+    @putByIdDirectPrivate(this, "abortSteps", (reason) => {
+        const result = @getByIdDirectPrivate(this, "abortAlgorithm").@call(@undefined, reason);
+        @writableStreamDefaultControllerClearAlgorithms(this);
+        return result;
+    });
+
+    @putByIdDirectPrivate(this, "errorSteps", () => {
+        @resetQueue(@getByIdDirectPrivate(this, "queue"));
+    });
+
+    return this;
+}
+
+function error(e)
+{
+    "use strict";
+
+    if (@getByIdDirectPrivate(this, "abortSteps") === @undefined)
+        throw @makeThisTypeError("WritableStreamDefaultController", "error");
+
+    const stream = @getByIdDirectPrivate(this, "stream");
+    if (@getByIdDirectPrivate(stream, "state") !== "writable")
+        return;
+    @writableStreamDefaultControllerError(this, e);
+}
diff --git a/Source/WebCore/Modules/streams/WritableStreamDefaultWriter.idl b/Source/WebCore/Modules/streams/WritableStreamDefaultWriter.idl
new file mode 100644
index 0000000..3d1026c
--- /dev/null
+++ b/Source/WebCore/Modules/streams/WritableStreamDefaultWriter.idl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    EnabledAtRuntime=WritableStreamAPI,
+    Exposed=(Window,Worker),
+    JSBuiltin,
+    PrivateIdentifier,
+    PublicIdentifier
+] interface WritableStreamDefaultWriter {
+    constructor(WritableStream stream);
+
+    readonly attribute Promise<void> closed;
+    readonly attribute unrestricted double? desiredSize;
+    readonly attribute Promise<void> ready;
+
+    Promise<void> abort(optional any reason);
+    Promise<void> close();
+    void releaseLock();
+    Promise<void> write(optional any chunk);
+};
diff --git a/Source/WebCore/Modules/streams/WritableStreamDefaultWriter.js b/Source/WebCore/Modules/streams/WritableStreamDefaultWriter.js
new file mode 100644
index 0000000..e9dc971
--- /dev/null
+++ b/Source/WebCore/Modules/streams/WritableStreamDefaultWriter.js
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+function initializeWritableStreamDefaultWriter(stream)
+{
+    "use strict";
+
+    if (!@isWritableStream(stream))
+        @throwTypeError("WritableStreamDefaultWriter constructor takes a WritableStream");
+
+    @setUpWritableStreamDefaultWriter(this, stream);
+    return this;
+}
+
+@getter
+function closed()
+{
+    "use strict";
+
+    if (!@isWritableStreamDefaultWriter(this))
+        return @Promise.@reject(@makeGetterTypeError("WritableStreamDefaultWriter", "closed"));
+
+    return @getByIdDirectPrivate(this, "closedPromise").@promise;
+}
+
+@getter
+function desiredSize()
+{
+    "use strict";
+
+    if (!@isWritableStreamDefaultWriter(this))
+        throw @makeThisTypeError("WritableStreamDefaultWriter", "desiredSize");
+
+    if (@getByIdDirectPrivate(this, "stream") === @undefined)
+        @throwTypeError("WritableStreamDefaultWriter has no stream");
+
+    return @writableStreamDefaultWriterGetDesiredSize(this);
+}
+
+@getter
+function ready()
+{
+    "use strict";
+
+    if (!@isWritableStreamDefaultWriter(this))
+        return @Promise.@reject(@makeThisTypeError("WritableStreamDefaultWriter", "ready"));
+
+    return @getByIdDirectPrivate(this, "readyPromise").@promise;
+}
+
+function abort(reason)
+{
+    "use strict";
+
+    if (!@isWritableStreamDefaultWriter(this))
+        return @Promise.@reject(@makeThisTypeError("WritableStreamDefaultWriter", "abort"));
+
+    if (@getByIdDirectPrivate(this, "stream") === @undefined)
+        return @Promise.@reject(@makeTypeError("WritableStreamDefaultWriter has no stream"));
+
+    return @writableStreamDefaultWriterAbort(this, reason);
+}
+
+function close()
+{
+    "use strict";
+
+    if (!@isWritableStreamDefaultWriter(this))
+        return @Promise.@reject(@makeThisTypeError("WritableStreamDefaultWriter", "close"));
+
+    const stream = @getByIdDirectPrivate(this, "stream");
+    if (stream === @undefined)
+        return @Promise.@reject(@makeTypeError("WritableStreamDefaultWriter has no stream"));
+
+    if (@writableStreamCloseQueuedOrInFlight(stream))
+        return @Promise.@reject(@makeTypeError("WritableStreamDefaultWriter is being closed"));
+    
+    return @writableStreamDefaultWriterClose(this);
+}
+
+function releaseLock()
+{
+    "use strict";
+
+    if (!@isWritableStreamDefaultWriter(this))
+        throw @makeThisTypeError("WritableStreamDefaultWriter", "releaseLock");
+
+    const stream = @getByIdDirectPrivate(this, "stream");
+    if (stream === @undefined)
+        return;
+
+    @assert(@getByIdDirectPrivate(stream, "writer") !== @undefined);
+    @writableStreamDefaultWriterRelease(this);
+}
+
+function write(chunk)
+{
+    "use strict";
+
+    if (!@isWritableStreamDefaultWriter(this))
+        return @Promise.@reject(@makeThisTypeError("WritableStreamDefaultWriter", "write"));
+
+    if (@getByIdDirectPrivate(this, "stream") === @undefined)
+        return @Promise.@reject(@makeTypeError("WritableStreamDefaultWriter has no stream"));
+
+    return @writableStreamDefaultWriterWrite(this, chunk);
+}
diff --git a/Source/WebCore/Modules/streams/WritableStreamInternals.js b/Source/WebCore/Modules/streams/WritableStreamInternals.js
index d45a84a1..4366265 100644
--- a/Source/WebCore/Modules/streams/WritableStreamInternals.js
+++ b/Source/WebCore/Modules/streams/WritableStreamInternals.js
@@ -33,104 +33,626 @@
     return @isObject(stream) && !!@getByIdDirectPrivate(stream, "underlyingSink");
 }
 
-function syncWritableStreamStateWithQueue(stream)
+function isWritableStreamDefaultWriter(writer)
 {
     "use strict";
 
+    return @isObject(writer) && !!@getByIdDirectPrivate(writer, "closedPromise");
+}
+
+function acquireWritableStreamDefaultWriter(stream)
+{
+    return new @WritableStreamDefaultWriter(stream);
+}
+
+function isWritableStreamLocked(stream)
+{
+    return @getByIdDirectPrivate(stream, "writer") !== @undefined;
+}
+
+function setUpWritableStreamDefaultWriter(writer, stream)
+{
+    if (@isWritableStreamLocked(stream))
+        @throwTypeError("WritableStream is locked");
+
+    @putByIdDirectPrivate(writer, "stream", stream);
+    @putByIdDirectPrivate(stream, "writer", writer);
+
+    const readyPromiseCapability = @newPromiseCapability(@Promise);
+    const closedPromiseCapability = @newPromiseCapability(@Promise);
+    @putByIdDirectPrivate(writer, "readyPromise", readyPromiseCapability);
+    @putByIdDirectPrivate(writer, "closedPromise", closedPromiseCapability);
+
     const state = @getByIdDirectPrivate(stream, "state");
-    if (state === @streamClosing)
-        return;
-
-    @assert(state === @streamWritable || state === @streamWaiting);
-
-    const shouldApplyBackpressure = @getByIdDirectPrivate(stream, "queue").size > @getByIdDirectPrivate(stream, "strategy").highWaterMark;
-    if (shouldApplyBackpressure && state === @streamWritable) {
-        @putByIdDirectPrivate(stream, "state", @streamWaiting);
-        @putByIdDirectPrivate(stream, "readyPromiseCapability", @newPromiseCapability(@Promise));
-    }
-    if (!shouldApplyBackpressure && state === @streamWaiting) {
-        @putByIdDirectPrivate(stream, "state", @streamWritable);
-        @getByIdDirectPrivate(stream, "readyPromiseCapability").@resolve.@call();
+    if (state === "writable") {
+        if (@writableStreamCloseQueuedOrInFlight(stream) || !@getByIdDirectPrivate(stream, "backpressure"))
+            readyPromiseCapability.@resolve.@call();
+    } else if (state === "erroring")
+        readyPromiseCapability.@reject.@call(@undefined, @getByIdDirectPrivate(stream, "storedError"));
+    else if (state === "closed") {
+        readyPromiseCapability.@resolve.@call();
+        closedPromiseCapability.@resolve.@call();
+    } else {
+        @assert(state === "errored");
+        const storedError = @getByIdDirectPrivate(stream, "storedError");
+        readyPromiseCapability.@reject.@call(@undefined, storedError);
+        closedPromiseCapability.@reject.@call(@undefined, storedError);
     }
 }
 
-function errorWritableStream(stream, e)
+function writableStreamAbort(stream, reason)
 {
-    "use strict";
-
     const state = @getByIdDirectPrivate(stream, "state");
-    if (state === @streamClosed || state === @streamErrored)
-        return;
-    while (@getByIdDirectPrivate(stream, "queue").content.length > 0) {
-        const writeRecord = @dequeueValue(@getByIdDirectPrivate(stream, "queue"));
-        if (writeRecord !== "close")
-            writeRecord.promiseCapability.@reject.@call(@undefined, e);
+    if (state === "closed" || state === "errored")
+        return @Promise.@resolve();
+
+    const pendingAbortRequest = @getByIdDirectPrivate(stream, "pendingAbortRequest");
+    if (pendingAbortRequest !== @undefined)
+        return pendingAbortRequest.promise.@promise;
+
+    @assert(state === "writable" || state === "erroring");
+    let wasAlreadyErroring = false;
+    if (state === "erroring") {
+        wasAlreadyErroring = true;
+        reason = @undefined;
     }
-    @putByIdDirectPrivate(stream, "storedError", e);
-    if (state === @streamWaiting)
-        @getByIdDirectPrivate(stream, "readyPromiseCapability").@resolve.@call();
-    @getByIdDirectPrivate(stream, "closedPromiseCapability").@reject.@call(@undefined, e);
-    @putByIdDirectPrivate(stream, "state", @streamErrored);
+
+    const abortPromiseCapability = @newPromiseCapability(@Promise);
+    @putByIdDirectPrivate(stream, "pendingAbortRequest", { promise : abortPromiseCapability, reason : reason, wasAlreadyErroring : wasAlreadyErroring });
+
+    if (!wasAlreadyErroring)
+        @writableStreamStartErroring(stream, reason);
+    return abortPromiseCapability.@promise;
 }
 
-function callOrScheduleWritableStreamAdvanceQueue(stream)
+function writableStreamClose(stream)
 {
-    "use strict";
+    const state = @getByIdDirectPrivate(stream, "state");
+    if (state === "closed" || state === "errored")
+        return @Promise.@reject(@makeTypeError("Cannot close a writable stream that is closed or errored"));
 
-    if (!@getByIdDirectPrivate(stream, "started"))
-        @getByIdDirectPrivate(stream, "startedPromise").@then(function() { @writableStreamAdvanceQueue(stream); });
+    @assert(state === "writable" || state === "erroring");
+    @assert(!@writableStreamCloseQueuedOrInFlight(stream));
+
+    const closePromiseCapability = @newPromiseCapability(@Promise);
+    @putByIdDirectPrivate(stream, "closeRequest", closePromiseCapability);
+
+    const writer = @getByIdDirectPrivate(stream, "writer");
+    if (writer !== @undefined && @getByIdDirectPrivate(stream, "backpressure") && state === "writable")
+        @getByIdDirectPrivate(writer, "readyPromise").@resolve.@call();
+        
+    @writableStreamDefaultControllerClose(@getByIdDirectPrivate(stream, "controller"));
+
+    return closePromiseCapability.@promise;
+}
+
+function writableStreamAddWriteRequest(stream)
+{
+    @assert(@isWritableStreamLocked(stream))
+    @assert(@getByIdDirectPrivate(stream, "state") === "writable");
+
+    const writePromiseCapability = @newPromiseCapability(@Promise);
+    const writeRequests = @getByIdDirectPrivate(stream, "writeRequests");
+    writeRequests.@push(writePromiseCapability);
+    return writePromiseCapability.@promise;
+}
+
+function writableStreamCloseQueuedOrInFlight(stream)
+{
+    return @getByIdDirectPrivate(stream, "closeRequest") !== @undefined || @getByIdDirectPrivate(stream, "inFlightCloseRequest") !== @undefined;
+}
+
+function writableStreamDealWithRejection(stream, error)
+{
+    const state = @getByIdDirectPrivate(stream, "state");
+    if (state === "writable") {
+        @writableStreamStartErroring(stream, error);
+        return;
+    }
+
+    @assert(state === "erroring");
+    @writableStreamFinishErroring(stream);
+}
+
+function writableStreamFinishErroring(stream)
+{
+    @assert(@getByIdDirectPrivate(stream, "state") === "erroring");
+    @assert(!@writableStreamHasOperationMarkedInFlight(stream));
+
+    @putByIdDirectPrivate(stream, "state", "errored");
+
+    const controller = @getByIdDirectPrivate(stream, "controller");
+    @getByIdDirectPrivate(controller, "errorSteps").@call();
+
+    const storedError = @getByIdDirectPrivate(stream, "storedError");
+    const requests = @getByIdDirectPrivate(stream, "writeRequests");
+    for (let index = 0, length = requests.length; index < length; ++index)
+        requests[index].@reject.@call(@undefined, storedError);
+
+    @putByIdDirectPrivate(stream, "writeRequests", []);
+
+    const abortRequest = @getByIdDirectPrivate(stream, "pendingAbortRequest");
+    if (abortRequest === @undefined) {
+        @writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
+        return;
+    }
+
+    @putByIdDirectPrivate(stream, "pendingAbortRequest", @undefined);
+    if (abortRequest.wasAlreadyErroring) {
+        abortRequest.promise.@reject.@call(@undefined, storedError);
+        @writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
+        return;
+    }
+
+    @getByIdDirectPrivate(controller, "abortSteps").@call(@undefined, abortRequest.reason).@then(() => {
+        abortRequest.promise.@resolve.@call();
+        @writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
+    }, (reason) => {
+        abortRequest.promise.@reject.@call(@undefined, reason);
+        @writableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
+    });
+}
+
+function writableStreamFinishInFlightClose(stream)
+{
+    const inFlightCloseRequest = @getByIdDirectPrivate(stream, "inFlightCloseRequest");
+    inFlightCloseRequest.@resolve.@call();
+
+    @putByIdDirectPrivate(stream, "inFlightCloseRequest", @undefined);
+
+    const state = @getByIdDirectPrivate(stream, "state");
+    @assert(state === "writable" || state === "erroring");
+
+    if (state === "erroring") {
+        @putByIdDirectPrivate(stream, "storedError", @undefined);
+        const abortRequest = @getByIdDirectPrivate(stream, "pendingAbortRequest");
+        if (abortRequest !== @undefined) {
+            abortRequest.promise.@resolve.@call();
+            @putByIdDirectPrivate(stream, "pendingAbortRequest", @undefined);
+        }
+    }
+
+    @putByIdDirectPrivate(stream, "state", "closed");
+
+    const writer = @getByIdDirectPrivate(stream, "writer");
+    if (writer !== @undefined)
+        @getByIdDirectPrivate(writer, "closedPromise").@resolve.@call();
+
+    @assert(@getByIdDirectPrivate(stream, "pendingAbortRequest") === @undefined);
+    @assert(@getByIdDirectPrivate(stream, "storedError") === @undefined);
+}
+
+function writableStreamFinishInFlightCloseWithError(stream, error)
+{
+    const inFlightCloseRequest = @getByIdDirectPrivate(stream, "inFlightCloseRequest");
+    @assert(inFlightCloseRequest !== @undefined);
+    inFlightCloseRequest.@reject.@call(@undefined, error);
+
+    @putByIdDirectPrivate(stream, "inFlightCloseRequest", @undefined);
+
+    const state = @getByIdDirectPrivate(stream, "state");
+    @assert(state === "writable" || state === "erroring");
+
+    const abortRequest = @getByIdDirectPrivate(stream, "pendingAbortRequest");
+    if (abortRequest !== @undefined) {
+        abortRequest.promise.@reject.@call(@undefined, error);
+        @putByIdDirectPrivate(stream, "pendingAbortRequest", @undefined);
+    }
+
+    @writableStreamDealWithRejection(stream, error);
+}
+
+function writableStreamFinishInFlightWrite(stream)
+{
+    const inFlightWriteRequest = @getByIdDirectPrivate(stream, "inFlightWriteRequest");
+    @assert(inFlightWriteRequest !== @undefined);
+    inFlightWriteRequest.@resolve.@call();
+
+    @putByIdDirectPrivate(stream, "inFlightWriteRequest", @undefined);
+}
+
+function writableStreamFinishInFlightWriteWithError(stream, error)
+{
+    const inFlightWriteRequest = @getByIdDirectPrivate(stream, "inFlightWriteRequest");
+    @assert(inFlightWriteRequest !== @undefined);
+    inFlightWriteRequest.@reject.@call(@undefined, error);
+
+    @putByIdDirectPrivate(stream, "inFlightWriteRequest", @undefined);
+
+    const state = @getByIdDirectPrivate(stream, "state");
+    @assert(state === "writable" || state === "erroring");
+
+    @writableStreamDealWithRejection(stream, error);
+}
+
+function writableStreamHasOperationMarkedInFlight(stream)
+{
+    return @getByIdDirectPrivate(stream, "inFlightWriteRequest") !== @undefined || @getByIdDirectPrivate(stream, "inFlightCloseRequest") !== @undefined;
+}
+
+function writableStreamMarkCloseRequestInFlight(stream)
+{
+    const closeRequest = @getByIdDirectPrivate(stream, "closeRequest");
+    @assert(@getByIdDirectPrivate(stream, "inFlightCloseRequest") === @undefined);
+    @assert(closeRequest !== @undefined);
+
+    @putByIdDirectPrivate(stream, "inFlightCloseRequest", closeRequest);
+    @putByIdDirectPrivate(stream, "closeRequest", @undefined);
+}
+
+function writableStreamMarkFirstWriteRequestInFlight(stream)
+{
+    const writeRequests = @getByIdDirectPrivate(stream, "writeRequests");
+    @assert(@getByIdDirectPrivate(stream, "inFlightWriteRequest") === @undefined);
+    @assert(writeRequests.length > 0);
+
+    const writeRequest = writeRequests.@shift();
+    @putByIdDirectPrivate(stream, "inFlightWriteRequest", writeRequest);
+}
+
+function writableStreamRejectCloseAndClosedPromiseIfNeeded(stream)
+{
+    @assert(@getByIdDirectPrivate(stream, "state") === "errored");
+
+    const storedError = @getByIdDirectPrivate(stream, "storedError");
+
+    const closeRequest = @getByIdDirectPrivate(stream, "closeRequest");
+    if (closeRequest !== @undefined) {
+        @assert(@getByIdDirectPrivate(stream, "inFlightCloseRequest") === @undefined);
+        closeRequest.@reject.@call(@undefined, storedError);
+        @putByIdDirectPrivate(stream, "closeRequest", @undefined);
+    }
+
+    const writer = @getByIdDirectPrivate(stream, "writer");
+    if (writer !== @undefined)
+        @getByIdDirectPrivate(writer, "closedPromise").@reject.@call(@undefined, storedError);
+}
+
+function writableStreamStartErroring(stream, reason)
+{
+    @assert(@getByIdDirectPrivate(stream, "storedError") === @undefined);
+    @assert(@getByIdDirectPrivate(stream, "state") === "writable");
+ 
+    const controller = @getByIdDirectPrivate(stream, "controller");
+    @assert(controller !== @undefined);
+
+    @putByIdDirectPrivate(stream, "state", "erroring");
+    @putByIdDirectPrivate(stream, "storedError", reason);
+
+    const writer = @getByIdDirectPrivate(stream, "writer");
+    if (writer !== @undefined)
+        @writableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason);
+
+    if (!@writableStreamHasOperationMarkedInFlight(stream) && @getByIdDirectPrivate(controller, "started"))
+        @writableStreamFinishErroring(stream);
+}
+
+function writableStreamUpdateBackpressure(stream, backpressure)
+{
+    @assert(@getByIdDirectPrivate(stream, "state") === "writable");
+    @assert(!@writableStreamCloseQueuedOrInFlight(stream));
+
+    const writer = @getByIdDirectPrivate(stream, "writer");
+    if (writer !== @undefined && backpressure !== @getByIdDirectPrivate(stream, "backpressure")) {
+        if (backpressure)
+           @putByIdDirectPrivate(writer, "readyPromise", @newPromiseCapability(@Promise));
+        else
+            @getByIdDirectPrivate(writer, "readyPromise").@resolve.@call();
+    }
+    @putByIdDirectPrivate(stream, "backpressure", backpressure);
+}
+
+function writableStreamDefaultWriterAbort(writer, reason)
+{
+    const stream = @getByIdDirectPrivate(writer, "stream");
+    @assert(stream !== @undefined);
+    return @writableStreamAbort(stream, reason);
+}
+
+function writableStreamDefaultWriterClose(writer)
+{
+    const stream = @getByIdDirectPrivate(writer, "stream");
+    @assert(stream !== @undefined);
+    return @writableStreamClose(stream);
+}
+
+function writableStreamDefaultWriterCloseWithErrorPropagation(writer)
+{
+    const stream = @getByIdDirectPrivate(writer, "stream");
+    @assert(stream !== @undefined);
+
+    const state = @getByIdDirectPrivate(stream, "state");
+
+    if (@writableStreamCloseQueuedOrInFlight(stream) || state === "closed")
+        return @Promise.@resolve();
+
+    if (state === "errored")
+        return @Promise.@reject(@getByIdDirectPrivate(stream, "storedError"));
+
+    @assert(state === "writable" || state === "erroring");
+    return @writableStreamDefaultWriterClose(writer);
+}
+
+function writableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error)
+{
+    @getByIdDirectPrivate(writer, "closedPromise").@reject.@call(@undefined, error);
+}
+
+function writableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error)
+{
+    @getByIdDirectPrivate(writer, "readyPromise").@reject.@call(@undefined, error);
+}
+
+function writableStreamDefaultWriterGetDesiredSize(writer)
+{
+    const stream = @getByIdDirectPrivate(writer, "stream");
+    @assert(stream !== @undefined);
+
+    const state = @getByIdDirectPrivate(stream, "state");
+
+    if (state === "errored" || state === "erroring")
+        return null;
+
+    if (state === "closed")
+        return 0;
+
+    return @writableStreamDefaultControllerGetDesiredSize(@getByIdDirectPrivate(stream, "controller"));
+}
+
+function writableStreamDefaultWriterRelease(writer)
+{
+    const stream = @getByIdDirectPrivate(writer, "stream");
+    @assert(stream !== @undefined);
+    @assert(@getByIdDirectPrivate(stream, "writer") === writer);
+
+    const releasedError = @makeTypeError("writableStreamDefaultWriterRelease");
+
+    @writableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError);
+    @writableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError);
+
+    @putByIdDirectPrivate(stream, "writer", @undefined);
+    @putByIdDirectPrivate(writer, "stream", @undefined);
+}
+
+function writableStreamDefaultWriterWrite(writer, chunk)
+{
+    const stream = @getByIdDirectPrivate(writer, "stream");
+    @assert(stream !== @undefined);
+
+    const controller = @getByIdDirectPrivate(stream, "controller");
+    @assert(controller !== @undefined);
+    const chunkSize = @writableStreamDefaultControllerGetChunkSize(controller, chunk);
+
+    if (stream !== @getByIdDirectPrivate(writer, "stream"))
+        return @Promise.@reject(@makeTypeError("writer is not stream's writer"));
+
+    const state = @getByIdDirectPrivate(stream, "state");
+    if (state === "errored")
+        return @Promise.@reject(@getByIdDirectPrivate(stream, "storedError"));
+
+    if (@writableStreamCloseQueuedOrInFlight(stream) || state === "closed")
+        return @Promise.@reject(@makeTypeError("stream is closing or closed"));
+
+    if (@writableStreamCloseQueuedOrInFlight(stream) || state === "closed")
+        return @Promise.@reject(@makeTypeError("stream is closing or closed"));
+
+    if (state === "erroring")
+        return @Promise.@reject(@getByIdDirectPrivate(stream, "storedError"));
+
+    @assert(state === "writable");
+
+    const promise = @writableStreamAddWriteRequest(stream);
+    @writableStreamDefaultControllerWrite(controller, chunk, chunkSize);
+    return promise;
+}
+
+function setUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm)
+{
+    @assert(@isWritableStream(stream));
+    @assert(@getByIdDirectPrivate(stream, "controller") === @undefined);
+
+    @putByIdDirectPrivate(controller, "stream", stream);
+    @putByIdDirectPrivate(stream, "controller", controller);
+
+    @resetQueue(@getByIdDirectPrivate(controller, "queue"));
+
+    @putByIdDirectPrivate(controller, "started", false);
+    @putByIdDirectPrivate(controller, "strategySizeAlgorithm", sizeAlgorithm);
+    @putByIdDirectPrivate(controller, "strategyHWM", highWaterMark);
+    @putByIdDirectPrivate(controller, "writeAlgorithm", writeAlgorithm);
+    @putByIdDirectPrivate(controller, "closeAlgorithm", closeAlgorithm);
+    @putByIdDirectPrivate(controller, "abortAlgorithm", abortAlgorithm);
+
+    const backpressure = @writableStreamDefaultControllerGetBackpressure(controller);
+    @writableStreamUpdateBackpressure(stream, backpressure);
+
+    @Promise.@resolve(startAlgorithm.@call()).@then(() => {
+        const state = @getByIdDirectPrivate(stream, "state");
+        @assert(state === "writable" || state === "erroring");
+        @putByIdDirectPrivate(controller, "started", true);
+        @writableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+    }, (error) => {
+        const state = @getByIdDirectPrivate(stream, "state");
+        @assert(state === "writable" || state === "erroring");
+        @putByIdDirectPrivate(controller, "started", true);
+        @writableStreamDealWithRejection(stream, error);
+    });
+}
+
+function setUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, underlyingSinkDict, highWaterMark, sizeAlgorithm)
+{
+    const controller = new @WritableStreamDefaultController();
+
+    let startAlgorithm = () => { };
+    let writeAlgorithm = () => { return @Promise.@resolve(); };
+    let closeAlgorithm = () => { return @Promise.@resolve(); };
+    let abortAlgorithm = () => { return @Promise.@resolve(); };
+
+    if ("start" in underlyingSinkDict) {
+        const startMethod = underlyingSinkDict["start"];
+        startAlgorithm = () => @promiseInvokeOrNoopMethodNoCatch(underlyingSink, startMethod, [controller]);
+    }
+    if ("write" in underlyingSinkDict) {
+        const writeMethod = underlyingSinkDict["write"];
+        writeAlgorithm = (chunk) => @promiseInvokeOrNoopMethod(underlyingSink, writeMethod, [chunk, controller]);
+    }
+    if ("close" in underlyingSinkDict) {
+        const closeMethod = underlyingSinkDict["close"];
+        closeAlgorithm = () => @promiseInvokeOrNoopMethod(underlyingSink, closeMethod, []);
+    }
+    if ("abort" in underlyingSinkDict) {
+        const abortMethod = underlyingSinkDict["abort"];
+        abortAlgorithm = (reason) => @promiseInvokeOrNoopMethod(underlyingSink, abortMethod, [reason]);
+    }
+
+    @setUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm);
+}
+
+function writableStreamDefaultControllerAdvanceQueueIfNeeded(controller)
+{
+    const stream = @getByIdDirectPrivate(controller, "stream");
+
+    if (!@getByIdDirectPrivate(controller, "started"))
+        return;
+
+    @assert(stream !== @undefined);
+    if (@getByIdDirectPrivate(stream, "inFlightWriteRequest") !== @undefined)
+        return;
+
+    const state = @getByIdDirectPrivate(stream, "state");
+    @assert(state !== "closed" || state !== "errored");
+    if (state === "erroring") {
+        @writableStreamFinishErroring(stream);
+        return;
+    }
+
+    if (@getByIdDirectPrivate(controller, "queue").content.length === 0)
+        return;
+
+    const value = @peekQueueValue(@getByIdDirectPrivate(controller, "queue"));
+    if (value === @isCloseSentinel)
+        @writableStreamDefaultControllerProcessClose(controller);
     else
-        @writableStreamAdvanceQueue(stream);
+        @writableStreamDefaultControllerProcessWrite(controller, value);
 }
 
-function writableStreamAdvanceQueue(stream)
+function isCloseSentinel()
 {
-    "use strict";
+}
 
-    if (@getByIdDirectPrivate(stream, "queue").content.length === 0 || @getByIdDirectPrivate(stream, "writing"))
-        return;
+function writableStreamDefaultControllerClearAlgorithms(controller)
+{
+    @putByIdDirectPrivate(controller, "writeAlgorithm", @undefined);
+    @putByIdDirectPrivate(controller, "closeAlgorithm", @undefined);
+    @putByIdDirectPrivate(controller, "abortAlgorithm", @undefined);
+    @putByIdDirectPrivate(controller, "strategySizeAlgorithm", @undefined);
+}
 
-    const writeRecord = @peekQueueValue(@getByIdDirectPrivate(stream, "queue"));
-    if (writeRecord === "close") {
-        @assert(@getByIdDirectPrivate(stream, "state") === @streamClosing);
-        @dequeueValue(@getByIdDirectPrivate(stream, "queue"));
-        @assert(@getByIdDirectPrivate(stream, "queue").content.length === 0);
-        @closeWritableStream(stream);
-        return;
+function writableStreamDefaultControllerClose(controller)
+{
+    @enqueueValueWithSize(@getByIdDirectPrivate(controller, "queue"), @isCloseSentinel, 0);
+    @writableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+}
+
+function writableStreamDefaultControllerError(controller, error)
+{
+    const stream = @getByIdDirectPrivate(controller, "stream");
+    @assert(stream !== @undefined);
+    @assert(@getByIdDirectPrivate(stream, "state") === "writable");
+
+    @writableStreamDefaultControllerClearAlgorithms(controller);
+    @writableStreamStartErroring(stream, error);
+}
+
+function writableStreamDefaultControllerErrorIfNeeded(controller, error)
+{
+    const stream = @getByIdDirectPrivate(controller, "stream");
+    if (@getByIdDirectPrivate(stream, "state") === "writable")
+        @writableStreamDefaultControllerError(controller, error);
+}
+
+function writableStreamDefaultControllerGetBackpressure(controller)
+{
+    const desiredSize = @writableStreamDefaultControllerGetDesiredSize(controller);
+    return desiredSize <= 0;
+}
+
+function writableStreamDefaultControllerGetChunkSize(controller, chunk)
+{
+    try {
+        return @getByIdDirectPrivate(controller, "strategySizeAlgorithm").@call(@undefined, chunk);
+    } catch (e) {
+        @writableStreamDefaultControllerErrorIfNeeded(controller, e);
+        return 1;
     }
-
-    @putByIdDirectPrivate(stream, "writing", true);
-    @promiseInvokeOrNoop(@getByIdDirectPrivate(stream, "underlyingSink"), "write", [writeRecord.chunk]).@then(
-        function() {
-            if (@getByIdDirectPrivate(stream, "state") === @streamErrored)
-                return;
-            @putByIdDirectPrivate(stream, "writing", false);
-            writeRecord.promiseCapability.@resolve.@call();
-            @dequeueValue(@getByIdDirectPrivate(stream, "queue"));
-            @syncWritableStreamStateWithQueue(stream);
-            @writableStreamAdvanceQueue(stream);
-        },
-        function(r) {
-            @errorWritableStream(stream, r);
-        }
-    );
 }
 
-function closeWritableStream(stream)
+function writableStreamDefaultControllerGetDesiredSize(controller)
 {
-    "use strict";
+    return @getByIdDirectPrivate(controller, "strategyHWM") - @getByIdDirectPrivate(controller, "queue").size;
+}
 
-    @assert(@getByIdDirectPrivate(stream, "state") === @streamClosing);
-    @promiseInvokeOrNoop(@getByIdDirectPrivate(stream, "underlyingSink"), "close").@then(
-        function() {
-            if (@getByIdDirectPrivate(stream, "state") === @streamErrored)
-                return;
-            @assert(@getByIdDirectPrivate(stream, "state") === @streamClosing);
-            @getByIdDirectPrivate(stream, "closedPromiseCapability").@resolve.@call();
-            @putByIdDirectPrivate(stream, "state", @streamClosed);
-        },
-        function(r) {
-            @errorWritableStream(stream, r);
+function writableStreamDefaultControllerProcessClose(controller)
+{
+    const stream = @getByIdDirectPrivate(controller, "stream");
+
+    @writableStreamMarkCloseRequestInFlight(stream);
+    @dequeueValue(@getByIdDirectPrivate(controller, "queue"));
+
+    @assert(@getByIdDirectPrivate(controller, "queue").content.length === 0);
+
+    const sinkClosePromise = @getByIdDirectPrivate(controller, "closeAlgorithm").@call();
+    @writableStreamDefaultControllerClearAlgorithms(controller);
+
+    sinkClosePromise.@then(() => {
+        @writableStreamFinishInFlightClose(stream);
+    }, (reason) => {
+        @writableStreamFinishInFlightCloseWithError(stream, reason);
+    });
+}
+
+function writableStreamDefaultControllerProcessWrite(controller, chunk)
+{
+    const stream = @getByIdDirectPrivate(controller, "stream");
+
+    @writableStreamMarkFirstWriteRequestInFlight(stream);
+
+    const sinkWritePromise = @getByIdDirectPrivate(controller, "writeAlgorithm").@call(@undefined, chunk);
+
+    sinkWritePromise.@then(() => {
+        @writableStreamFinishInFlightWrite(stream);
+        const state = @getByIdDirectPrivate(stream, "state");
+        @assert(state === "writable" || state === "erroring");
+
+        @dequeueValue(@getByIdDirectPrivate(controller, "queue"));
+        if (!@writableStreamCloseQueuedOrInFlight(stream) && state === "writable") {
+            const backpressure = @writableStreamDefaultControllerGetBackpressure(controller);
+            @writableStreamUpdateBackpressure(stream, backpressure);
         }
-    );
+        @writableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+    }, (reason) => {
+        const state = @getByIdDirectPrivate(stream, "state");
+        if (state === "writable")
+            @writableStreamDefaultControllerClearAlgorithms(controller);
+
+        @writableStreamFinishInFlightWriteWithError(stream, reason);
+    });
+}
+
+function writableStreamDefaultControllerWrite(controller, chunk, chunkSize)
+{
+    try {
+        @enqueueValueWithSize(@getByIdDirectPrivate(controller, "queue"), chunk, chunkSize);
+
+        const stream = @getByIdDirectPrivate(controller, "stream");
+
+        const state = @getByIdDirectPrivate(stream, "state");
+        if (!@writableStreamCloseQueuedOrInFlight(stream) && state === "writable") {
+            const backpressure = @writableStreamDefaultControllerGetBackpressure(controller);
+            @writableStreamUpdateBackpressure(stream, backpressure);
+        }
+        @writableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+    } catch (e) {
+        @writableStreamDefaultControllerErrorIfNeeded(controller, e);
+    }
 }
diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt
index 27e2d63..6e9d0ef 100644
--- a/Source/WebCore/Sources.txt
+++ b/Source/WebCore/Sources.txt
@@ -3627,6 +3627,8 @@
 JSWorklet.cpp
 JSWorkletGlobalScope.cpp
 JSWritableStream.cpp
+JSWritableStreamDefaultController.cpp
+JSWritableStreamDefaultWriter.cpp
 JSXMLDocument.cpp
 JSXMLHttpRequest.cpp
 JSXMLHttpRequestEventTarget.cpp
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index a86032e..157025f 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -7527,6 +7527,10 @@
 		417612AC1E3A993B00C3D81D /* LibWebRTCMediaEndpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibWebRTCMediaEndpoint.h; path = libwebrtc/LibWebRTCMediaEndpoint.h; sourceTree = "<group>"; };
 		417612AD1E3A993B00C3D81D /* LibWebRTCPeerConnectionBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibWebRTCPeerConnectionBackend.cpp; path = libwebrtc/LibWebRTCPeerConnectionBackend.cpp; sourceTree = "<group>"; };
 		417612AE1E3A993B00C3D81D /* LibWebRTCPeerConnectionBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibWebRTCPeerConnectionBackend.h; path = libwebrtc/LibWebRTCPeerConnectionBackend.h; sourceTree = "<group>"; };
+		4176673024DC08EA008BFE28 /* WritableStreamDefaultWriter.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WritableStreamDefaultWriter.idl; sourceTree = "<group>"; };
+		4176673224DC08EB008BFE28 /* WritableStreamDefaultWriter.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = WritableStreamDefaultWriter.js; sourceTree = "<group>"; };
+		4176673324DC08EB008BFE28 /* WritableStreamDefaultController.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = WritableStreamDefaultController.js; sourceTree = "<group>"; };
+		4176673424DC08EB008BFE28 /* WritableStreamDefaultController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WritableStreamDefaultController.idl; sourceTree = "<group>"; };
 		4176900322FCD8F200B1576D /* MediaSourceRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourceRegistry.h; sourceTree = "<group>"; };
 		4176900422FCD8F200B1576D /* MediaSourceRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSourceRegistry.cpp; sourceTree = "<group>"; };
 		4176E88F23C348D2003E83FE /* MediaRecorderProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaRecorderProvider.h; sourceTree = "<group>"; };
@@ -18891,6 +18895,10 @@
 				9908B0F11BCACF9100ED0F55 /* StreamInternals.js */,
 				41A023ED1A39DB7900F722DF /* WritableStream.idl */,
 				9908B0EF1BCACF9100ED0F75 /* WritableStream.js */,
+				4176673424DC08EB008BFE28 /* WritableStreamDefaultController.idl */,
+				4176673324DC08EB008BFE28 /* WritableStreamDefaultController.js */,
+				4176673024DC08EA008BFE28 /* WritableStreamDefaultWriter.idl */,
+				4176673224DC08EB008BFE28 /* WritableStreamDefaultWriter.js */,
 				9908B0F11BCACF9100ED0F75 /* WritableStreamInternals.js */,
 			);
 			path = streams;
diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
index 1fe1725..16e6b27 100644
--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
@@ -249,6 +249,8 @@
     macro(Worklet) \
     macro(WorkletGlobalScope) \
     macro(WritableStream) \
+    macro(WritableStreamDefaultController) \
+    macro(WritableStreamDefaultWriter) \
     macro(XMLHttpRequest) \
     macro(XRBoundedReferenceSpace) \
     macro(XRFrame) \
@@ -271,11 +273,14 @@
     macro(XRViewerPose) \
     macro(XRViewport) \
     macro(XRWebGLLayer) \
+    macro(abortAlgorithm) \
+    macro(abortSteps) \
     macro(appendFromJS) \
     macro(associatedReadableByteStreamController) \
     macro(autoAllocateChunkSize) \
     macro(backingMap) \
     macro(backingSet) \
+    macro(backpressure) \
     macro(blur) \
     macro(body) \
     macro(byobRequest) \
@@ -286,8 +291,11 @@
     macro(cancelIdleCallback) \
     macro(cloneArrayBuffer) \
     macro(close) \
+    macro(closeAlgorithm) \
+    macro(closeRequest) \
     macro(closeRequested) \
     macro(closed) \
+    macro(closedPromise) \
     macro(closedPromiseCapability) \
     macro(collectMatchingElementsInFlatTree) \
     macro(consume) \
@@ -299,6 +307,7 @@
     macro(customElements) \
     macro(disturbed) \
     macro(document) \
+    macro(errorSteps) \
     macro(failureKind) \
     macro(fetch) \
     macro(fetchRequest) \
@@ -311,6 +320,8 @@
     macro(gpu) \
     macro(header) \
     macro(href) \
+    macro(inFlightCloseRequest) \
+    macro(inFlightWriteRequest) \
     macro(indexedDB) \
     macro(initializeWith) \
     macro(isDisturbed) \
@@ -358,6 +369,7 @@
     macro(readableByteStreamAPIEnabled) \
     macro(readableStreamController) \
     macro(reader) \
+    macro(readyPromise) \
     macro(readyPromiseCapability) \
     macro(requestAnimationFrame) \
     macro(requestIdleCallback) \
@@ -377,6 +389,8 @@
     macro(storedError) \
     macro(strategy) \
     macro(strategyHWM) \
+    macro(strategySizeAlgorithm) \
+    macro(stream) \
     macro(streamClosed) \
     macro(streamClosing) \
     macro(streamErrored) \
@@ -407,7 +421,11 @@
     macro(webkitOfflineAudioContext) \
     macro(webkitOscillatorNode) \
     macro(window) \
+    macro(writeAlgorithm) \
     macro(writing) \
+    macro(writer) \
+    macro(pendingAbortRequest) \
+    macro(writeRequests) \
     WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS(macro) \
 
 class WebCoreBuiltinNames {
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index ca09cc9..c9f37ba 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,5 +1,15 @@
 2020-08-12  Youenn Fablet  <youenn@apple.com>
 
+        Refresh WritableStream up to spec
+        https://bugs.webkit.org/show_bug.cgi?id=215267
+
+        Reviewed by Geoff Garen.
+
+        * Shared/WebPreferences.yaml:
+        Add a dedicated runtime flag, off by default.
+
+2020-08-12  Youenn Fablet  <youenn@apple.com>
+
         Enable H264 low latency code path by default for MacOS
         https://bugs.webkit.org/show_bug.cgi?id=215371
 
diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml
index 039f062..19f1ea9 100644
--- a/Source/WebKit/Shared/WebPreferences.yaml
+++ b/Source/WebKit/Shared/WebPreferences.yaml
@@ -2144,6 +2144,14 @@
   webcoreBinding: RuntimeEnabledFeatures
   condition: ENABLE(WEBXR)
 
+WritableStreamAPIEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "WritableStream API"
+  humanReadableDescription: "Enable Writable Stream API"
+  category: experimental
+  webcoreBinding: RuntimeEnabledFeatures
+
 # Deprecated
 
 ICECandidateFilteringEnabled:
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index f7e66b9..446594a 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,17 @@
+2020-08-12  Youenn Fablet  <youenn@apple.com>
+
+        Refresh WritableStream up to spec
+        https://bugs.webkit.org/show_bug.cgi?id=215267
+
+        Reviewed by Geoff Garen.
+
+        Put console log in stderr as this makes some tests flaky otherwise.
+
+        * DumpRenderTree/TestOptions.cpp:
+        (shouldDumpJSConsoleLogInStdErr):
+        * WebKitTestRunner/TestOptions.cpp:
+        (WTR::shouldDumpJSConsoleLogInStdErr):
+
 2020-08-11  Alex Christensen  <achristensen@webkit.org>
 
         Enable HTTP/2 ping API tests
diff --git a/Tools/DumpRenderTree/TestOptions.cpp b/Tools/DumpRenderTree/TestOptions.cpp
index e7c5836..f4c14d4 100644
--- a/Tools/DumpRenderTree/TestOptions.cpp
+++ b/Tools/DumpRenderTree/TestOptions.cpp
@@ -53,6 +53,7 @@
         || pathContains(pathOrURL, "localhost:8800/cors") || pathContains(pathOrURL, "localhost:9443/cors")
         || pathContains(pathOrURL, "localhost:8800/fetch") || pathContains(pathOrURL, "localhost:9443/fetch")
         || pathContains(pathOrURL, "localhost:8800/service-workers") || pathContains(pathOrURL, "localhost:9443/service-workers")
+        || pathContains(pathOrURL, "localhost:8800/streams/writable-streams") || pathContains(pathOrURL, "localhost:9443/streams/writable-streams")
         || pathContains(pathOrURL, "localhost:8800/xhr") || pathContains(pathOrURL, "localhost:9443/xhr")
         || pathContains(pathOrURL, "localhost:8800/webrtc") || pathContains(pathOrURL, "localhost:9443/webrtc")
         || pathContains(pathOrURL, "localhost:8800/websockets") || pathContains(pathOrURL, "localhost:9443/websockets");
diff --git a/Tools/WebKitTestRunner/TestOptions.cpp b/Tools/WebKitTestRunner/TestOptions.cpp
index db077842..c95706f 100644
--- a/Tools/WebKitTestRunner/TestOptions.cpp
+++ b/Tools/WebKitTestRunner/TestOptions.cpp
@@ -76,6 +76,7 @@
         || pathContains(pathOrURL, "localhost:8800/cors") || pathContains(pathOrURL, "localhost:9443/cors")
         || pathContains(pathOrURL, "localhost:8800/fetch") || pathContains(pathOrURL, "localhost:9443/fetch")
         || pathContains(pathOrURL, "localhost:8800/service-workers") || pathContains(pathOrURL, "localhost:9443/service-workers")
+        || pathContains(pathOrURL, "localhost:8800/streams/writable-streams") || pathContains(pathOrURL, "localhost:9443/streams/writable-streams")
         || pathContains(pathOrURL, "localhost:8800/xhr") || pathContains(pathOrURL, "localhost:9443/xhr")
         || pathContains(pathOrURL, "localhost:8800/webrtc") || pathContains(pathOrURL, "localhost:9443/webrtc")
         || pathContains(pathOrURL, "localhost:8800/websockets") || pathContains(pathOrURL, "localhost:9443/websockets");