Bug 1636399 [wpt PR 23474] - Fix //fetch/metadata/preload.https.sub.html, a=testonly
authorMike West <mkwst@google.com>
Wed, 13 May 2020 09:47:52 +0000
changeset 531151 e1b279ab9036a08e94efc1c896c82e1bc14afd21
parent 531150 e0cb1fb269f4c6f00f6cecb435ecb8a51e5c92a0
child 531152 da766ca50e082a89387305f78f68203fc36496ee
push id37435
push userapavel@mozilla.com
push dateWed, 20 May 2020 15:28:23 +0000
treeherdermozilla-central@5415da14ec9a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1636399, 23474
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1636399 [wpt PR 23474] - Fix //fetch/metadata/preload.https.sub.html, a=testonly Automatic update from web-platform-tests Fix //fetch/metadata/preload.https.sub.html (#23474) We're currently exiting the test before `fetch()` resolves due to using `step_func_done()` rather than `step_func()`. -- wpt-commits: dbf24d19488c5498b099c48540c62a48695b2b73 wpt-pr: 23474
testing/web-platform/tests/fetch/metadata/preload.https.sub.html
--- a/testing/web-platform/tests/fetch/metadata/preload.https.sub.html
+++ b/testing/web-platform/tests/fetch/metadata/preload.https.sub.html
@@ -17,21 +17,20 @@
 
       let e = document.createElement('link');
       e.rel = "preload";
       e.href = `https://${host}/fetch/metadata/resources/record-header.py?file=${key}`;
       e.setAttribute("crossorigin", "crossorigin");
       if (as !== undefined) {
         e.setAttribute("as", as);
       }
-      e.onload = e.onerror = t.step_func_done(e => {
+      e.onload = e.onerror = t.step_func(e => {
         fetch("/fetch/metadata/resources/record-header.py?retrieve=true&file=" + key)
           .then(t.step_func(response => response.text()))
-          .then(t.step_func(text => assert_header_equals(text, expected)))
-          .then(t.step_func_done(_ => resolve()))
+          .then(t.step_func_done(text => assert_header_equals(text, expected, `preload ${as} ${host}`)))
           .catch(t.unreached_func());
       });
 
       document.head.appendChild(e);
     }, `<link rel='preload' as='${as}' href='https://${host}/...'>`);
   }
 
   let as_tests = [