From 65d5974192a3e95b5180c1e6e36a8a636ba78770 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 6 Mar 2022 15:36:48 +0100 Subject: [PATCH] Replace XMLHttpRequest usage with the Fetch API in `Driver._quit` This is another step in what'll hopefully become a series of patches to implement PR 14287 in smaller steps. --- test/driver.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/driver.js b/test/driver.js index 31e4b192f..2fc3704c2 100644 --- a/test/driver.js +++ b/test/driver.js @@ -845,9 +845,9 @@ class Driver { this.end.textContent = "Tests finished. Close this window!"; // Send the quit request - const r = new XMLHttpRequest(); - r.open("POST", `/tellMeToQuit?browser=${escape(this.browser)}`, false); - r.send(null); + fetch(`/tellMeToQuit?browser=${escape(this.browser)}`, { + method: "POST", + }); } _info(message) {