Bug 1512050 - Add not-yet-fully-passing web-platform tests about readable streams to jit-test anyway. r=arai
☠☠ backed out by 7eb42458e2d8 ☠ ☠
authorJason Orendorff <jorendorff@mozilla.com>
Fri, 07 Dec 2018 20:04:08 +0000
changeset 508854 f5c4eb4129904f4366800b968d9d5c1f245b620b
parent 508853 1c9251fcdc672a0062c5e48a54716f4dfb427b1a
child 508855 71253f35ac3cf2fa6f1c7b613443c2d494809c6a
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1512050
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1512050 - Add not-yet-fully-passing web-platform tests about readable streams to jit-test anyway. r=arai Differential Revision: https://phabricator.services.mozilla.com/D13750
js/src/jit-test/tests/web-platform/streams/readable-streams/general.js
js/src/jit-test/tests/web-platform/streams/readable-streams/reentrant-strategies.js
js/src/jit-test/tests/web-platform/streams/readable-streams/templated.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/web-platform/streams/readable-streams/general.js
@@ -0,0 +1,28 @@
+// The web-platform test we're going to load (on the last line of this file)
+// contains many tests; among them, it checks for the existence of pipeTo and
+// pipeThrough, which we don't implement yet. Hack it:
+if (ReadableStream.prototype.pipeTo || ReadableStream.prototype.pipeThrough) {
+  throw new Error("Congratulations on implementing pipeTo/pipeThrough! Please update this test.\n");
+}
+// They don't have to work to pass the test, just exist:
+Object.defineProperties(ReadableStream.prototype, {
+  "pipeTo": {
+    configurable: true,
+    writable: true,
+    enumerable: false,
+    value: function pipeTo(dest, {preventClose, preventAbort, preventCancel, signal} = {}) {
+      throw new InternalError("pipeTo: not implemented");
+    },
+  },
+  "pipeThrough": {
+    configurable: true,
+    writable: true,
+    enumerable: false,
+    value: function pipeThrough({writable, readable}, {preventClose, preventAbort, preventCancel, signal}) {
+      throw new InternalError("pipeThrough: not implemented");
+    },
+  },
+});
+
+load(libdir + "web-platform-testharness.js");
+load_web_platform_test("streams/readable-streams/general.js");
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/web-platform/streams/readable-streams/reentrant-strategies.js
@@ -0,0 +1,4 @@
+// |jit-test| error: ReferenceError: WritableStream is not defined
+
+load(libdir + "web-platform-testharness.js");
+load(libdir + "../../../../testing/web-platform/tests/streams/readable-streams/reentrant-strategies.js");
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/web-platform/streams/readable-streams/templated.js
@@ -0,0 +1,28 @@
+// The web-platform test we're going to load (on the last line of this file)
+// contains many tests; among them, it checks for the existence of pipeTo and
+// pipeThrough, which we don't implement yet. Hack it:
+if (ReadableStream.prototype.pipeTo || ReadableStream.prototype.pipeThrough) {
+  throw new Error("Congratulations on implementing pipeTo/pipeThrough! Please update this test.\n");
+}
+// They don't have to work to pass the test, just exist:
+Object.defineProperties(ReadableStream.prototype, {
+  "pipeTo": {
+    configurable: true,
+    writable: true,
+    enumerable: false,
+    value: function pipeTo(dest, {preventClose, preventAbort, preventCancel, signal} = {}) {
+      throw new InternalError("pipeTo: not implemented");
+    },
+  },
+  "pipeThrough": {
+    configurable: true,
+    writable: true,
+    enumerable: false,
+    value: function pipeThrough({writable, readable}, {preventClose, preventAbort, preventCancel, signal}) {
+      throw new InternalError("pipeThrough: not implemented");
+    },
+  },
+});
+
+load(libdir + "web-platform-testharness.js");
+load_web_platform_test("streams/readable-streams/templated.js");