Bug 1506769 [wpt PR 14028] - Move webrtc quic tests to webrtc-quic, a=testonly
authoryouennf <youennf@users.noreply.github.com>
Mon, 19 Nov 2018 18:46:46 +0000
changeset 504013 8b797bf446c843db38a18aee54c072c212c261d0
parent 504012 7378efd716566160646f83fc0b3da1fbbe25972c
child 504014 2f8f409c6b77a23287d446b11d2ecac9765fc00c
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1506769, 14028
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 1506769 [wpt PR 14028] - Move webrtc quic tests to webrtc-quic, a=testonly Automatic update from web-platform-testsMove webrtc quic tests to webrtc-quic (#14028) -- wpt-commits: 89ad54bd0d498c8209ec80407f5758566f91e82f wpt-pr: 14028
testing/web-platform/tests/webrtc-quic/META.yml
testing/web-platform/tests/webrtc-quic/RTCQuicStream-helper.js
testing/web-platform/tests/webrtc-quic/RTCQuicStream.https.html
testing/web-platform/tests/webrtc-quic/RTCQuicTransport-helper.js
testing/web-platform/tests/webrtc-quic/RTCQuicTransport.https.html
testing/web-platform/tests/webrtc/RTCQuicStream-helper.js
testing/web-platform/tests/webrtc/RTCQuicStream.https.html
testing/web-platform/tests/webrtc/RTCQuicTransport-helper.js
testing/web-platform/tests/webrtc/RTCQuicTransport.https.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webrtc-quic/META.yml
@@ -0,0 +1,5 @@
+spec: https://github.com/w3c/webrtc-quic
+suggested_reviewers:
+  - aboba
+  - henbos
+  - steveanton
rename from testing/web-platform/tests/webrtc/RTCQuicStream-helper.js
rename to testing/web-platform/tests/webrtc-quic/RTCQuicStream-helper.js
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webrtc-quic/RTCQuicStream.https.html
@@ -0,0 +1,293 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>RTCQuicStream.https.html</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../webrtc/RTCIceTransport-extension-helper.js"></script>
+<script src="RTCQuicTransport-helper.js"></script>
+<script src="RTCQuicStream-helper.js"></script>
+<script>
+'use strict';
+
+// These tests are based on the following specification:
+// https://w3c.github.io/webrtc-quic/
+
+// The following helper functions are called from RTCQuicTransport-helper.js:
+//   makeStandaloneQuicTransport
+//   makeTwoConnectedQuicTransports
+// The following helper functions are called from RTCQuicStream-helper.js:
+//   closed_stream_test
+
+promise_test(async t => {
+  const [ quicTransport, ] = await makeTwoConnectedQuicTransports(t);
+  const quicStream = quicTransport.createStream();
+  assert_equals(quicStream.transport, quicTransport,
+      'Expect transport to be set to the creating RTCQuicTransport.');
+  assert_equals(quicStream.state, 'open', `Expect state to be 'open'.`);
+  assert_equals(quicStream.readBufferedAmount, 0,
+      'Expect read buffered amount to be 0.');
+  assert_equals(quicStream.writeBufferedAmount, 0,
+      'Expect write buffered amount to be 0.');
+  assert_greater_than(quicStream.maxWriteBufferedAmount, 0,
+      'Expect max write buffered amount to be greater than 0.');
+}, 'createStream() returns an RTCQuicStream with initial properties set.');
+
+promise_test(async t => {
+  const quicTransport = await makeStandaloneQuicTransport(t);
+  assert_throws('InvalidStateError', () => quicTransport.createStream());
+}, 'createStream() throws if the transport is not connected.');
+
+promise_test(async t => {
+  const quicTransport = await makeStandaloneQuicTransport(t);
+  quicTransport.stop();
+  assert_throws('InvalidStateError', () => quicTransport.createStream());
+}, 'createStream() throws if the transport is closed.');
+
+promise_test(async t => {
+  const [ quicTransport, ] = await makeTwoConnectedQuicTransports(t);
+  const firstQuicStream = quicTransport.createStream();
+  const secondQuicStream = quicTransport.createStream();
+  quicTransport.stop();
+  assert_equals(firstQuicStream.state, 'closed');
+  assert_equals(secondQuicStream.state, 'closed');
+}, 'RTCQuicTransport.stop() closes all local streams.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  localQuicTransport.createStream().finish();
+  localQuicTransport.createStream().finish();
+  const remoteWatcher =
+      new EventWatcher(t, remoteQuicTransport, [ 'quicstream', 'statechange' ]);
+  const { stream: firstRemoteStream } =
+      await remoteWatcher.wait_for('quicstream');
+  const { stream: secondRemoteStream } =
+      await remoteWatcher.wait_for('quicstream');
+  localQuicTransport.stop();
+  await remoteWatcher.wait_for('statechange');
+  assert_equals(firstRemoteStream.state, 'closed');
+  assert_equals(secondRemoteStream.state, 'closed');
+}, 'RTCQuicTransport.stop() closes all remote streams.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.finish();
+  assert_equals(localStream.state, 'closing');
+}, `finish() changes state to 'closing'.`);
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.finish();
+  localStream.finish();
+  assert_equals(localStream.state, 'closing');
+}, `finish() twice does not change state.`);
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.reset();
+  assert_equals(localStream.state, 'closed');
+}, `reset() changes state to 'closed'.`);
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.finish();
+  localStream.reset();
+  assert_equals(localStream.state, 'closed');
+}, `reset() following finish() changes state to 'closed'.`);
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.reset();
+  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'quicstream');
+  const { stream: remoteStream } = await remoteWatcher.wait_for('quicstream');
+  assert_equals(remoteStream.state, 'open');
+  const remoteStreamWatcher = new EventWatcher(t, remoteStream, 'statechange');
+  await remoteStreamWatcher.wait_for('statechange');
+  assert_equals(remoteStream.state, 'closed');
+}, 'createStream() followed by reset() fires a quicstream event followed ' +
+    `by a statechange event to 'closed' on the remote side.`);
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+    await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array(0));
+  assert_equals(localStream.writeBufferedAmount, 0);
+}, 'write() with an empty array does nothing.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+    await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array([65]));
+  assert_equals(localStream.writeBufferedAmount, 1);
+  localStream.write(new Uint8Array([66, 67]));
+  assert_equals(localStream.writeBufferedAmount, 3);
+  localStream.write(new Uint8Array([68, 69, 70]));
+  assert_equals(localStream.writeBufferedAmount, 6);
+}, 'write() adds to writeBufferedAmount each call.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array(localStream.maxWriteBufferedAmount));
+  assert_equals(localStream.writeBufferedAmount,
+      localStream.maxWriteBufferedAmount);
+}, 'write() can write exactly maxWriteBufferedAmount.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  assert_throws('OperationError',
+      () =>
+          localStream.write(
+              new Uint8Array(localStream.maxWriteBufferedAmount + 1)));
+  assert_equals(localStream.writeBufferedAmount, 0);
+}, 'write() throws if data longer than maxWriteBufferedAmount.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array(10));
+  assert_throws('OperationError',
+      () =>
+          localStream.write(
+              new Uint8Array(localStream.maxWriteBufferedAmount)));
+  assert_equals(localStream.writeBufferedAmount, 10);
+}, 'write() throws if total write buffered amount would be greater than ' +
+    'maxWriteBufferedAmount.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array(10));
+  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'quicstream');
+  await remoteWatcher.wait_for('quicstream');
+}, 'write() causes quicstream event to fire on the remote transport.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.finish();
+  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'quicstream');
+  await remoteWatcher.wait_for('quicstream');
+}, 'finish() causes quicstream event to fire on the remote transport.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.finish();
+  assert_throws('InvalidStateError',
+      () => localStream.write(new Uint8Array()));
+}, 'write() throws InvalidStateError if finish() has been called.');
+
+closed_stream_test(async (t, stream) => {
+  assert_throws('InvalidStateError', () => stream.write(new Uint8Array()));
+}, 'write() throws InvalidStateError.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array(10));
+  localStream.reset();
+  assert_equals(localStream.writeBufferedAmount, 0);
+}, 'writeBufferedAmount set to 0 after local reset().');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array(10));
+  localQuicTransport.stop();
+  assert_equals(localStream.writeBufferedAmount, 0);
+}, 'writeBufferedAmount set to 0 after local RTCQuicTransport stop().');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array(10));
+  localStream.finish();
+  assert_equals(localStream.writeBufferedAmount, 10);
+}, 'writeBufferedAmount maintained after finish() has been called.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  await localStream.waitForWriteBufferedAmountBelow(0);
+}, 'waitForWriteBufferedAmountBelow(0) resolves immediately.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  await localStream.waitForWriteBufferedAmountBelow(
+      localStream.maxWriteBufferedAmount);
+}, 'waitForWriteBufferedAmountBelow(maxWriteBufferedAmount) resolves ' +
+  'immediately.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array(localStream.maxWriteBufferedAmount));
+  const promise1 = localStream.waitForWriteBufferedAmountBelow(0);
+  const promise2 = localStream.waitForWriteBufferedAmountBelow(0);
+  localStream.finish();
+  await Promise.all([
+      promise_rejects(t, 'InvalidStateError', promise1),
+      promise_rejects(t, 'InvalidStateError', promise2)]);
+}, 'Pending waitForWriteBufferedAmountBelow() promises rejected after ' +
+  'finish().');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  localStream.write(new Uint8Array(localStream.maxWriteBufferedAmount));
+  const promise1 = localStream.waitForWriteBufferedAmountBelow(0);
+  const promise2 = localStream.waitForWriteBufferedAmountBelow(0);
+  localStream.reset();
+  await Promise.all([
+      promise_rejects(t, 'InvalidStateError', promise1),
+      promise_rejects(t, 'InvalidStateError', promise2)]);
+}, 'Pending waitForWriteBufferedAmountBelow() promises rejected after ' +
+  'reset().');
+
+closed_stream_test(async (t, stream) => {
+  await promise_rejects(t, 'InvalidStateError',
+      stream.waitForWriteBufferedAmountBelow(0));
+}, 'waitForWriteBufferedBelow() rejects with InvalidStateError.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  const localStream = localQuicTransport.createStream();
+  assert_object_equals(
+      localStream.readInto(new Uint8Array(10)),
+      { amount: 0, finished: false });
+}, 'readInto() on new local stream returns amount 0.');
+
+closed_stream_test(async (t, stream) => {
+  assert_throws('InvalidStateError', () => stream.readInto(new Uint8Array(1)));
+}, 'readInto() throws InvalidStateError.');
+
+</script>
rename from testing/web-platform/tests/webrtc/RTCQuicTransport-helper.js
rename to testing/web-platform/tests/webrtc-quic/RTCQuicTransport-helper.js
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webrtc-quic/RTCQuicTransport.https.html
@@ -0,0 +1,189 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>RTCQuicTransport.https.html</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../webrtc/RTCIceTransport-extension-helper.js"></script>
+<script src="RTCQuicTransport-helper.js"></script>
+<script>
+'use strict';
+
+// These tests are based on the following specification:
+// https://w3c.github.io/webrtc-quic/
+
+// The following helper functions are called from
+// RTCIceTransport-extension-helper.js:
+//   makeIceTransport
+//   makeAndGatherTwoIceTransports
+
+// The following helper functions are called from RTCQuicTransport-helper.js:
+//   generateCertificate
+//   makeQuicTransport
+//   makeStandaloneQuicTransport
+//   makeAndStartTwoQuicTransports
+//   makeTwoConnectedQuicTransports
+
+promise_test(async t => {
+  const certificate = await generateCertificate();
+  const iceTransport = makeIceTransport(t);
+  const quicTransport = makeQuicTransport(t, iceTransport, [ certificate ]);
+  assert_equals(quicTransport.transport, iceTransport,
+      'Expect transport to be the same as the one passed in the constructor.');
+  assert_equals(quicTransport.state, 'new', `Expect state to be 'new'.`);
+  assert_object_equals(quicTransport.getLocalParameters(),
+      { role: 'auto', fingerprints: certificate.getFingerprints() },
+      'Expect local parameters to be initialized.');
+  assert_equals(quicTransport.getRemoteParameters(), null,
+      'Expect no remote parameters.');
+  assert_array_equals(quicTransport.getCertificates(), [ certificate ],
+      'Expect one certificate.');
+  assert_array_equals(quicTransport.getRemoteCertificates(), [],
+      'Expect no remote certificates.');
+}, 'RTCQuicTransport initial properties are set.');
+
+promise_test(async t => {
+  const [ firstCertificate, secondCertificate ] =
+      await Promise.all([ generateCertificate(), generateCertificate() ]);
+  const quicTransport =
+      makeQuicTransport(t, makeIceTransport(t),
+          [ firstCertificate, secondCertificate ]);
+  assert_array_equals(quicTransport.getCertificates(),
+      [ firstCertificate, secondCertificate ]);
+}, 'getCertificates() returns the certificates passed in the constructor.');
+
+promise_test(async t => {
+  const [ firstCertificate, secondCertificate ] =
+      await Promise.all([ generateCertificate(), generateCertificate() ]);
+  const quicTransport =
+      makeQuicTransport(t, makeIceTransport(t),
+          [ firstCertificate, secondCertificate ]);
+  assert_object_equals(quicTransport.getLocalParameters(), {
+    role: 'auto',
+    fingerprints:
+        [ firstCertificate.getFingerprints()[0],
+            secondCertificate.getFingerprints()[0] ],
+  });
+  assert_array_equals(quicTransport.getCertificates(),
+      [ firstCertificate, secondCertificate ]);
+}, 'getLocalParameters() has fingerprints for all certificates passed in the ' +
+    'constructor.');
+
+promise_test(async t => {
+  const expiredCertificate = await generateCertificate({ expires: 0 });
+  assert_throws(new TypeError(),
+      () => makeQuicTransport(t, makeIceTransport(t), [ expiredCertificate ]));
+}, 'RTCQuicTransport constructor throws if passed an expired certificate.');
+
+promise_test(async t => {
+  const certificate = await generateCertificate();
+  const iceTransport = makeIceTransport(t);
+  iceTransport.stop();
+  assert_throws('InvalidStateError',
+      () => makeQuicTransport(t, iceTransport, [ certificate ]));
+}, 'RTCQuicTransport constructor throws if passed a closed RTCIceTransport.');
+
+promise_test(async t => {
+  const certificate = await generateCertificate();
+  const iceTransport = makeIceTransport(t);
+  const firstQuicTransport =
+      makeQuicTransport(t, iceTransport, [ certificate ]);
+  assert_throws('InvalidStateError',
+      () => makeQuicTransport(t, iceTransport, [ certificate ]));
+}, 'RTCQuicTransport constructor throws if passed an RTCIceTransport that ' +
+    'already has an active RTCQuicTransport.');
+
+promise_test(async t => {
+  const quicTransport = await makeStandaloneQuicTransport(t);
+  quicTransport.stop();
+  assert_equals(quicTransport.state, 'closed');
+}, `stop() changes state to 'closed'.`);
+
+promise_test(async t => {
+  const quicTransport = await makeStandaloneQuicTransport(t);
+  quicTransport.transport.stop();
+  assert_equals(quicTransport.state, 'closed');
+}, `RTCIceTransport.stop() changes RTCQuicTransport.state to 'closed'.`);
+
+promise_test(async t => {
+  const quicTransport = await makeStandaloneQuicTransport(t);
+  quicTransport.start(quicTransport.getLocalParameters());
+  assert_equals(quicTransport.state, 'new');
+}, 'start() with a non-started RTCIceTransport does not change state.');
+
+promise_test(async t => {
+  const certificate = await generateCertificate();
+  const [ localIceTransport, remoteIceTransport ] =
+      makeAndGatherTwoIceTransports(t);
+  const quicTransport =
+      makeQuicTransport(t, localIceTransport, [ certificate ]);
+  quicTransport.start(quicTransport.getLocalParameters());
+  const iceTransportWatcher =
+      new EventWatcher(t, remoteIceTransport, 'icecandidate');
+  await iceTransportWatcher.wait_for('icecandidate');
+  localIceTransport.start(remoteIceTransport.getLocalParameters(),
+      'controlling');
+  assert_equals(quicTransport.state, 'connecting');
+}, 'start() with a non-started RTCIceTransport later changes state to ' +
+    `'connecting' once the RTCIceTransport.start() is called.`);
+
+promise_test(async t => {
+  const certificate = await generateCertificate();
+  const [ localIceTransport, remoteIceTransport ] =
+      makeAndGatherTwoIceTransports(t);
+  const quicTransport =
+      makeQuicTransport(t, localIceTransport, [ certificate ]);
+  const iceTransportWatcher =
+      new EventWatcher(t, remoteIceTransport, 'icecandidate');
+  await iceTransportWatcher.wait_for('icecandidate');
+  localIceTransport.start(remoteIceTransport.getLocalParameters());
+  quicTransport.start(quicTransport.getLocalParameters());
+  assert_equals(quicTransport.state, 'connecting');
+}, `start() with a started RTCIceTransport changes state to 'connecting'.`);
+
+promise_test(async t => {
+  const quicTransport = await makeStandaloneQuicTransport(t);
+  quicTransport.stop();
+  assert_throws('InvalidStateError',
+      () => quicTransport.start(quicTransport.getLocalParameters()));
+}, 'start() throws if called after stop().');
+
+promise_test(async t => {
+  const quicTransport = await makeStandaloneQuicTransport(t);
+  quicTransport.transport.stop();
+  assert_throws('InvalidStateError',
+      () => quicTransport.start(quicTransport.getLocalParameters()));
+}, 'start() throws if called after the RTCIceTransport has stopped.');
+
+promise_test(async t => {
+  const quicTransport = await makeStandaloneQuicTransport(t);
+  quicTransport.start(quicTransport.getLocalParameters());
+  assert_throws('InvalidStateError',
+      () => quicTransport.start(quicTransport.getLocalParameters()));
+}, 'start() throws if called twice.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeAndStartTwoQuicTransports(t);
+  const localWatcher = new EventWatcher(t, localQuicTransport, 'statechange');
+  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'statechange');
+  await Promise.all([
+    localWatcher.wait_for('statechange').then(() => {
+      assert_equals(localQuicTransport.state, 'connected');
+    }),
+    remoteWatcher.wait_for('statechange').then(() => {
+      assert_equals(remoteQuicTransport.state, 'connected');
+    }),
+  ]);
+}, 'Two RTCQuicTransports connect to each other.');
+
+promise_test(async t => {
+  const [ localQuicTransport, remoteQuicTransport ] =
+      await makeTwoConnectedQuicTransports(t);
+  localQuicTransport.stop();
+  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'statechange');
+  await remoteWatcher.wait_for('statechange');
+  assert_equals(remoteQuicTransport.state, 'closed');
+}, `stop() fires a statechange event to 'closed' on the remote transport`);
+
+</script>
+
deleted file mode 100644
--- a/testing/web-platform/tests/webrtc/RTCQuicStream.https.html
+++ /dev/null
@@ -1,293 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>RTCQuicStream.https.html</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="RTCIceTransport-extension-helper.js"></script>
-<script src="RTCQuicTransport-helper.js"></script>
-<script src="RTCQuicStream-helper.js"></script>
-<script>
-'use strict';
-
-// These tests are based on the following specification:
-// https://w3c.github.io/webrtc-quic/
-
-// The following helper functions are called from RTCQuicTransport-helper.js:
-//   makeStandaloneQuicTransport
-//   makeTwoConnectedQuicTransports
-// The following helper functions are called from RTCQuicStream-helper.js:
-//   closed_stream_test
-
-promise_test(async t => {
-  const [ quicTransport, ] = await makeTwoConnectedQuicTransports(t);
-  const quicStream = quicTransport.createStream();
-  assert_equals(quicStream.transport, quicTransport,
-      'Expect transport to be set to the creating RTCQuicTransport.');
-  assert_equals(quicStream.state, 'open', `Expect state to be 'open'.`);
-  assert_equals(quicStream.readBufferedAmount, 0,
-      'Expect read buffered amount to be 0.');
-  assert_equals(quicStream.writeBufferedAmount, 0,
-      'Expect write buffered amount to be 0.');
-  assert_greater_than(quicStream.maxWriteBufferedAmount, 0,
-      'Expect max write buffered amount to be greater than 0.');
-}, 'createStream() returns an RTCQuicStream with initial properties set.');
-
-promise_test(async t => {
-  const quicTransport = await makeStandaloneQuicTransport(t);
-  assert_throws('InvalidStateError', () => quicTransport.createStream());
-}, 'createStream() throws if the transport is not connected.');
-
-promise_test(async t => {
-  const quicTransport = await makeStandaloneQuicTransport(t);
-  quicTransport.stop();
-  assert_throws('InvalidStateError', () => quicTransport.createStream());
-}, 'createStream() throws if the transport is closed.');
-
-promise_test(async t => {
-  const [ quicTransport, ] = await makeTwoConnectedQuicTransports(t);
-  const firstQuicStream = quicTransport.createStream();
-  const secondQuicStream = quicTransport.createStream();
-  quicTransport.stop();
-  assert_equals(firstQuicStream.state, 'closed');
-  assert_equals(secondQuicStream.state, 'closed');
-}, 'RTCQuicTransport.stop() closes all local streams.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  localQuicTransport.createStream().finish();
-  localQuicTransport.createStream().finish();
-  const remoteWatcher =
-      new EventWatcher(t, remoteQuicTransport, [ 'quicstream', 'statechange' ]);
-  const { stream: firstRemoteStream } =
-      await remoteWatcher.wait_for('quicstream');
-  const { stream: secondRemoteStream } =
-      await remoteWatcher.wait_for('quicstream');
-  localQuicTransport.stop();
-  await remoteWatcher.wait_for('statechange');
-  assert_equals(firstRemoteStream.state, 'closed');
-  assert_equals(secondRemoteStream.state, 'closed');
-}, 'RTCQuicTransport.stop() closes all remote streams.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.finish();
-  assert_equals(localStream.state, 'closing');
-}, `finish() changes state to 'closing'.`);
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.finish();
-  localStream.finish();
-  assert_equals(localStream.state, 'closing');
-}, `finish() twice does not change state.`);
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.reset();
-  assert_equals(localStream.state, 'closed');
-}, `reset() changes state to 'closed'.`);
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.finish();
-  localStream.reset();
-  assert_equals(localStream.state, 'closed');
-}, `reset() following finish() changes state to 'closed'.`);
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.reset();
-  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'quicstream');
-  const { stream: remoteStream } = await remoteWatcher.wait_for('quicstream');
-  assert_equals(remoteStream.state, 'open');
-  const remoteStreamWatcher = new EventWatcher(t, remoteStream, 'statechange');
-  await remoteStreamWatcher.wait_for('statechange');
-  assert_equals(remoteStream.state, 'closed');
-}, 'createStream() followed by reset() fires a quicstream event followed ' +
-    `by a statechange event to 'closed' on the remote side.`);
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-    await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array(0));
-  assert_equals(localStream.writeBufferedAmount, 0);
-}, 'write() with an empty array does nothing.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-    await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array([65]));
-  assert_equals(localStream.writeBufferedAmount, 1);
-  localStream.write(new Uint8Array([66, 67]));
-  assert_equals(localStream.writeBufferedAmount, 3);
-  localStream.write(new Uint8Array([68, 69, 70]));
-  assert_equals(localStream.writeBufferedAmount, 6);
-}, 'write() adds to writeBufferedAmount each call.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array(localStream.maxWriteBufferedAmount));
-  assert_equals(localStream.writeBufferedAmount,
-      localStream.maxWriteBufferedAmount);
-}, 'write() can write exactly maxWriteBufferedAmount.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  assert_throws('OperationError',
-      () =>
-          localStream.write(
-              new Uint8Array(localStream.maxWriteBufferedAmount + 1)));
-  assert_equals(localStream.writeBufferedAmount, 0);
-}, 'write() throws if data longer than maxWriteBufferedAmount.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array(10));
-  assert_throws('OperationError',
-      () =>
-          localStream.write(
-              new Uint8Array(localStream.maxWriteBufferedAmount)));
-  assert_equals(localStream.writeBufferedAmount, 10);
-}, 'write() throws if total write buffered amount would be greater than ' +
-    'maxWriteBufferedAmount.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array(10));
-  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'quicstream');
-  await remoteWatcher.wait_for('quicstream');
-}, 'write() causes quicstream event to fire on the remote transport.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.finish();
-  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'quicstream');
-  await remoteWatcher.wait_for('quicstream');
-}, 'finish() causes quicstream event to fire on the remote transport.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.finish();
-  assert_throws('InvalidStateError',
-      () => localStream.write(new Uint8Array()));
-}, 'write() throws InvalidStateError if finish() has been called.');
-
-closed_stream_test(async (t, stream) => {
-  assert_throws('InvalidStateError', () => stream.write(new Uint8Array()));
-}, 'write() throws InvalidStateError.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array(10));
-  localStream.reset();
-  assert_equals(localStream.writeBufferedAmount, 0);
-}, 'writeBufferedAmount set to 0 after local reset().');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array(10));
-  localQuicTransport.stop();
-  assert_equals(localStream.writeBufferedAmount, 0);
-}, 'writeBufferedAmount set to 0 after local RTCQuicTransport stop().');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array(10));
-  localStream.finish();
-  assert_equals(localStream.writeBufferedAmount, 10);
-}, 'writeBufferedAmount maintained after finish() has been called.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  await localStream.waitForWriteBufferedAmountBelow(0);
-}, 'waitForWriteBufferedAmountBelow(0) resolves immediately.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  await localStream.waitForWriteBufferedAmountBelow(
-      localStream.maxWriteBufferedAmount);
-}, 'waitForWriteBufferedAmountBelow(maxWriteBufferedAmount) resolves ' +
-  'immediately.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array(localStream.maxWriteBufferedAmount));
-  const promise1 = localStream.waitForWriteBufferedAmountBelow(0);
-  const promise2 = localStream.waitForWriteBufferedAmountBelow(0);
-  localStream.finish();
-  await Promise.all([
-      promise_rejects(t, 'InvalidStateError', promise1),
-      promise_rejects(t, 'InvalidStateError', promise2)]);
-}, 'Pending waitForWriteBufferedAmountBelow() promises rejected after ' +
-  'finish().');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  localStream.write(new Uint8Array(localStream.maxWriteBufferedAmount));
-  const promise1 = localStream.waitForWriteBufferedAmountBelow(0);
-  const promise2 = localStream.waitForWriteBufferedAmountBelow(0);
-  localStream.reset();
-  await Promise.all([
-      promise_rejects(t, 'InvalidStateError', promise1),
-      promise_rejects(t, 'InvalidStateError', promise2)]);
-}, 'Pending waitForWriteBufferedAmountBelow() promises rejected after ' +
-  'reset().');
-
-closed_stream_test(async (t, stream) => {
-  await promise_rejects(t, 'InvalidStateError',
-      stream.waitForWriteBufferedAmountBelow(0));
-}, 'waitForWriteBufferedBelow() rejects with InvalidStateError.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  const localStream = localQuicTransport.createStream();
-  assert_object_equals(
-      localStream.readInto(new Uint8Array(10)),
-      { amount: 0, finished: false });
-}, 'readInto() on new local stream returns amount 0.');
-
-closed_stream_test(async (t, stream) => {
-  assert_throws('InvalidStateError', () => stream.readInto(new Uint8Array(1)));
-}, 'readInto() throws InvalidStateError.');
-
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/webrtc/RTCQuicTransport.https.html
+++ /dev/null
@@ -1,189 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>RTCQuicTransport.https.html</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="RTCIceTransport-extension-helper.js"></script>
-<script src="RTCQuicTransport-helper.js"></script>
-<script>
-'use strict';
-
-// These tests are based on the following specification:
-// https://w3c.github.io/webrtc-quic/
-
-// The following helper functions are called from
-// RTCIceTransport-extension-helper.js:
-//   makeIceTransport
-//   makeAndGatherTwoIceTransports
-
-// The following helper functions are called from RTCQuicTransport-helper.js:
-//   generateCertificate
-//   makeQuicTransport
-//   makeStandaloneQuicTransport
-//   makeAndStartTwoQuicTransports
-//   makeTwoConnectedQuicTransports
-
-promise_test(async t => {
-  const certificate = await generateCertificate();
-  const iceTransport = makeIceTransport(t);
-  const quicTransport = makeQuicTransport(t, iceTransport, [ certificate ]);
-  assert_equals(quicTransport.transport, iceTransport,
-      'Expect transport to be the same as the one passed in the constructor.');
-  assert_equals(quicTransport.state, 'new', `Expect state to be 'new'.`);
-  assert_object_equals(quicTransport.getLocalParameters(),
-      { role: 'auto', fingerprints: certificate.getFingerprints() },
-      'Expect local parameters to be initialized.');
-  assert_equals(quicTransport.getRemoteParameters(), null,
-      'Expect no remote parameters.');
-  assert_array_equals(quicTransport.getCertificates(), [ certificate ],
-      'Expect one certificate.');
-  assert_array_equals(quicTransport.getRemoteCertificates(), [],
-      'Expect no remote certificates.');
-}, 'RTCQuicTransport initial properties are set.');
-
-promise_test(async t => {
-  const [ firstCertificate, secondCertificate ] =
-      await Promise.all([ generateCertificate(), generateCertificate() ]);
-  const quicTransport =
-      makeQuicTransport(t, makeIceTransport(t),
-          [ firstCertificate, secondCertificate ]);
-  assert_array_equals(quicTransport.getCertificates(),
-      [ firstCertificate, secondCertificate ]);
-}, 'getCertificates() returns the certificates passed in the constructor.');
-
-promise_test(async t => {
-  const [ firstCertificate, secondCertificate ] =
-      await Promise.all([ generateCertificate(), generateCertificate() ]);
-  const quicTransport =
-      makeQuicTransport(t, makeIceTransport(t),
-          [ firstCertificate, secondCertificate ]);
-  assert_object_equals(quicTransport.getLocalParameters(), {
-    role: 'auto',
-    fingerprints:
-        [ firstCertificate.getFingerprints()[0],
-            secondCertificate.getFingerprints()[0] ],
-  });
-  assert_array_equals(quicTransport.getCertificates(),
-      [ firstCertificate, secondCertificate ]);
-}, 'getLocalParameters() has fingerprints for all certificates passed in the ' +
-    'constructor.');
-
-promise_test(async t => {
-  const expiredCertificate = await generateCertificate({ expires: 0 });
-  assert_throws(new TypeError(),
-      () => makeQuicTransport(t, makeIceTransport(t), [ expiredCertificate ]));
-}, 'RTCQuicTransport constructor throws if passed an expired certificate.');
-
-promise_test(async t => {
-  const certificate = await generateCertificate();
-  const iceTransport = makeIceTransport(t);
-  iceTransport.stop();
-  assert_throws('InvalidStateError',
-      () => makeQuicTransport(t, iceTransport, [ certificate ]));
-}, 'RTCQuicTransport constructor throws if passed a closed RTCIceTransport.');
-
-promise_test(async t => {
-  const certificate = await generateCertificate();
-  const iceTransport = makeIceTransport(t);
-  const firstQuicTransport =
-      makeQuicTransport(t, iceTransport, [ certificate ]);
-  assert_throws('InvalidStateError',
-      () => makeQuicTransport(t, iceTransport, [ certificate ]));
-}, 'RTCQuicTransport constructor throws if passed an RTCIceTransport that ' +
-    'already has an active RTCQuicTransport.');
-
-promise_test(async t => {
-  const quicTransport = await makeStandaloneQuicTransport(t);
-  quicTransport.stop();
-  assert_equals(quicTransport.state, 'closed');
-}, `stop() changes state to 'closed'.`);
-
-promise_test(async t => {
-  const quicTransport = await makeStandaloneQuicTransport(t);
-  quicTransport.transport.stop();
-  assert_equals(quicTransport.state, 'closed');
-}, `RTCIceTransport.stop() changes RTCQuicTransport.state to 'closed'.`);
-
-promise_test(async t => {
-  const quicTransport = await makeStandaloneQuicTransport(t);
-  quicTransport.start(quicTransport.getLocalParameters());
-  assert_equals(quicTransport.state, 'new');
-}, 'start() with a non-started RTCIceTransport does not change state.');
-
-promise_test(async t => {
-  const certificate = await generateCertificate();
-  const [ localIceTransport, remoteIceTransport ] =
-      makeAndGatherTwoIceTransports(t);
-  const quicTransport =
-      makeQuicTransport(t, localIceTransport, [ certificate ]);
-  quicTransport.start(quicTransport.getLocalParameters());
-  const iceTransportWatcher =
-      new EventWatcher(t, remoteIceTransport, 'icecandidate');
-  await iceTransportWatcher.wait_for('icecandidate');
-  localIceTransport.start(remoteIceTransport.getLocalParameters(),
-      'controlling');
-  assert_equals(quicTransport.state, 'connecting');
-}, 'start() with a non-started RTCIceTransport later changes state to ' +
-    `'connecting' once the RTCIceTransport.start() is called.`);
-
-promise_test(async t => {
-  const certificate = await generateCertificate();
-  const [ localIceTransport, remoteIceTransport ] =
-      makeAndGatherTwoIceTransports(t);
-  const quicTransport =
-      makeQuicTransport(t, localIceTransport, [ certificate ]);
-  const iceTransportWatcher =
-      new EventWatcher(t, remoteIceTransport, 'icecandidate');
-  await iceTransportWatcher.wait_for('icecandidate');
-  localIceTransport.start(remoteIceTransport.getLocalParameters());
-  quicTransport.start(quicTransport.getLocalParameters());
-  assert_equals(quicTransport.state, 'connecting');
-}, `start() with a started RTCIceTransport changes state to 'connecting'.`);
-
-promise_test(async t => {
-  const quicTransport = await makeStandaloneQuicTransport(t);
-  quicTransport.stop();
-  assert_throws('InvalidStateError',
-      () => quicTransport.start(quicTransport.getLocalParameters()));
-}, 'start() throws if called after stop().');
-
-promise_test(async t => {
-  const quicTransport = await makeStandaloneQuicTransport(t);
-  quicTransport.transport.stop();
-  assert_throws('InvalidStateError',
-      () => quicTransport.start(quicTransport.getLocalParameters()));
-}, 'start() throws if called after the RTCIceTransport has stopped.');
-
-promise_test(async t => {
-  const quicTransport = await makeStandaloneQuicTransport(t);
-  quicTransport.start(quicTransport.getLocalParameters());
-  assert_throws('InvalidStateError',
-      () => quicTransport.start(quicTransport.getLocalParameters()));
-}, 'start() throws if called twice.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeAndStartTwoQuicTransports(t);
-  const localWatcher = new EventWatcher(t, localQuicTransport, 'statechange');
-  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'statechange');
-  await Promise.all([
-    localWatcher.wait_for('statechange').then(() => {
-      assert_equals(localQuicTransport.state, 'connected');
-    }),
-    remoteWatcher.wait_for('statechange').then(() => {
-      assert_equals(remoteQuicTransport.state, 'connected');
-    }),
-  ]);
-}, 'Two RTCQuicTransports connect to each other.');
-
-promise_test(async t => {
-  const [ localQuicTransport, remoteQuicTransport ] =
-      await makeTwoConnectedQuicTransports(t);
-  localQuicTransport.stop();
-  const remoteWatcher = new EventWatcher(t, remoteQuicTransport, 'statechange');
-  await remoteWatcher.wait_for('statechange');
-  assert_equals(remoteQuicTransport.state, 'closed');
-}, `stop() fires a statechange event to 'closed' on the remote transport`);
-
-</script>
-