1// META: global=window,worker 2 3const statuses = [ 4 0, 5 300, 6 400, 7 404, 8 500, 9 600, 10 700, 11 999, 12]; 13 14for (const method of ["compileStreaming", "instantiateStreaming"]) { 15 for (const status of statuses) { 16 promise_test(t => { 17 const response = fetch(`status.py?status=${status}`); 18 return promise_rejects_js(t, TypeError, WebAssembly[method](response)); 19 }, `Response with status ${status}: ${method}`); 20 } 21} 22