
</script>

<script id=abort>
  var s2 = AbortSignal.abort('over 9000');
  testing.expectEqual(true, s2.aborted);
  testing.expectEqual('over 9000', s2.reason);
  testing.expectEqual('AbortError', AbortSignal.abort().reason);
</script>

<script id=timeout>
  var s3 = AbortSignal.timeout(10);
  testing.eventually(() => {
    testing.expectEqual(true, s3.aborted);
    testing.expectEqual('TimeoutError', s3.reason);
    testing.expectError('Error: TimeoutError', () => {
      s3.throwIfAborted()
    });
  });
