sync-no-timeout.any.js (613B)
1 // META: global=window,dedicatedworker,sharedworker 2 // META: timeout=long 3 4 // This is a regression test for https://crbug.com/844268, when a timeout of 10 5 // seconds was applied to XHR in Chrome. There should be no timeout unless the 6 // "timeout" parameter is set on the object. 7 test(t => { 8 let xhr = new XMLHttpRequest(); 9 10 // For practical reasons, we can't wait forever. 12 seconds is long enough to 11 // reliably reproduce the bug in Chrome. 12 xhr.open('GET', 'resources/trickle.py?ms=1000&count=12', false); 13 14 // The test will fail if this throws. 15 xhr.send(); 16 }, 'Sync XHR should not have a timeout');