Bug 1706095 [wpt PR 28574] - chore: make fetch/api/response strict compatible, a=testonly draft
authorLuca Casonato <lucacasonato@yahoo.com>
Mon, 19 Apr 2021 15:47:57 +0000
changeset 3667634 463db7e9c102ebe53ed868a9c72cc73a3afbaf6a
parent 3666865 8e850fd29a957f505e0355c1326279e06e9040bb
child 3667635 8a014b2a4fc83bfed326bc10ab7c1c02d2f4926b
push id683125
push userwptsync@mozilla.com
push dateMon, 19 Apr 2021 16:45:39 +0000
treeherdertry@8a014b2a4fc8 [default view] [failures only]
reviewerstestonly
bugs1706095, 28574
milestone89.0a1
Bug 1706095 [wpt PR 28574] - chore: make fetch/api/response strict compatible, a=testonly SKIP_BMO_CHECK wpt-commit: 1e5bc8de7da22e6c507e132501a6612576fc79c2 wpt-pr: 28574
testing/web-platform/tests/fetch/api/response/response-static-redirect.any.js
--- a/testing/web-platform/tests/fetch/api/response/response-static-redirect.any.js
+++ b/testing/web-platform/tests/fetch/api/response/response-static-redirect.any.js
@@ -1,26 +1,26 @@
 // META: global=window,worker
 // META: title=Response: redirect static method
 
 var url = "http://test.url:1234/";
 test(function() {
-  redirectResponse = Response.redirect(url);
+  const redirectResponse = Response.redirect(url);
   assert_equals(redirectResponse.type, "default");
   assert_false(redirectResponse.redirected);
   assert_false(redirectResponse.ok);
   assert_equals(redirectResponse.status, 302, "Default redirect status is 302");
   assert_equals(redirectResponse.headers.get("Location"), url,
     "redirected response has Location header with the correct url");
   assert_equals(redirectResponse.statusText, "");
 }, "Check default redirect response");
 
 [301, 302, 303, 307, 308].forEach(function(status) {
   test(function() {
-    redirectResponse = Response.redirect(url, status);
+    const redirectResponse = Response.redirect(url, status);
     assert_equals(redirectResponse.type, "default");
     assert_false(redirectResponse.redirected);
     assert_false(redirectResponse.ok);
     assert_equals(redirectResponse.status, status, "Redirect status is " + status);
     assert_equals(redirectResponse.headers.get("Location"), url);
     assert_equals(redirectResponse.statusText, "");
   }, "Check response returned by static method redirect(), status = " + status);
 });