1// META: global=window,worker 2'use strict'; 3 4const error1 = new Error('error1'); 5error1.name = 'error1'; 6 7const error2 = new Error('error2'); 8error2.name = 'error2'; 9 10test(() => { 11 const underlyingSource = { get start() { throw error1; } }; 12 const queuingStrategy = { highWaterMark: 0, get size() { throw error2; } }; 13 14 // underlyingSource is converted in prose in the method body, whereas queuingStrategy is done at the IDL layer. 15 // So the queuingStrategy exception should be encountered first. 16 assert_throws_exactly(error2, () => new ReadableStream(underlyingSource, queuingStrategy)); 17}, 'underlyingSource argument should be converted after queuingStrategy argument'); 18