status.h2.window.js (563B)
1 // See also /fetch/api/basic/status.h2.any.js 2 3 [ 4 200, 5 210, 6 400, 7 404, 8 410, 9 500, 10 502 11 ].forEach(status => { 12 async_test(t => { 13 const client = new XMLHttpRequest(); 14 client.open("GET", "/xhr/resources/status.py?code=" + status); 15 client.send(); 16 client.onload = t.step_func_done(() => { 17 assert_equals(client.status, status, "status should be " + status); 18 assert_equals(client.statusText, "", "statusText should be the empty string"); 19 }); 20 }, "statusText over H2 for status " + status + " should be the empty string"); 21 });