@@ -420,15 +420,17 @@ add_task(async function testGarbageCollectedSourceTextContent() {
420
420
* - it first loads fine so that it shows up
421
421
* - initDebuggerWithAbsoluteURL will first load the document before the debugger
422
422
* - so the debugger will have to fetch the html page content via a network request
423
- * - the test page will return a 404 error code on the second load attempt
423
+ * - the test page will return a connection reset error on the second load attempt
424
424
*/
425
425
let loadCount = 0 ;
426
426
httpServer . registerPathHandler (
427
- "/200-then-404-page .html" ,
427
+ "/200-then-connection-reset .html" ,
428
428
( request , response ) => {
429
429
loadCount ++ ;
430
430
if ( loadCount > 1 ) {
431
- response . setStatusLine ( request . httpVersion , 404 , "Not found" ) ;
431
+ response . seizePower ( ) ;
432
+ response . bodyOutPutStream . close ( ) ;
433
+ response . finish ( ) ;
432
434
return ;
433
435
}
434
436
response . setStatusLine ( request . httpVersion , 200 , "OK" ) ;
@@ -440,17 +442,17 @@ add_task(async function testFailingHtmlSource() {
440
442
441
443
// initDebuggerWithAbsoluteURL will first load the document once before the debugger,
442
444
// then the debugger will have to fetch the html page content via a network request
443
- // therefore the test page will return a 404 error code on the second load attempt
445
+ // therefore the test page will encounter a connection reset error on the second load attempt
444
446
const dbg = await initDebuggerWithAbsoluteURL (
445
- BASE_URL + "200-then-404-page .html" ,
446
- "200-then-404-page .html"
447
+ BASE_URL + "200-then-connection-reset .html" ,
448
+ "200-then-connection-reset .html"
447
449
) ;
448
450
449
451
// We can't select the HTML page as its source content isn't fetched
450
452
// (waitForSelectedSource doesn't resolve)
451
453
// Note that it is important to load the page *before* opening the page
452
454
// so that the thread actor has to request the page content and will fail
453
- const source = findSource ( dbg , "200-then-404-page .html" ) ;
455
+ const source = findSource ( dbg , "200-then-connection-reset .html" ) ;
454
456
await dbg . actions . selectLocation (
455
457
getContext ( dbg ) ,
456
458
{ sourceId : source . id } ,
0 commit comments