Closed Bug 1454134 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 8735 - [wptserve] Add on-demand file hash computation


(Testing :: web-platform-tests, enhancement, P4)



(firefox61 fixed)

Tracking Status
firefox61 --- fixed


(Reporter:, Unassigned)




(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 8735 into mozilla-central (this bug is closed when the sync is complete).

Details from upstream follow.

Mike Pennisi <> wrote:
>  [wptserve] Add on-demand file hash computation
>  Certain tests require that all HTML `<script>` tags be declared with an
>  `integrity` attribute which specifies the cryptographic hash of the file
>  to be loaded. These tests were initially implemented with a static value
>  for the hash of the test harness files located in the shared "resources"
>  directory.
>  In order to support continued development of those shared files, the
>  tests should be authored in a way that is tolerant of such
>  modifications.
>  Introduce a new templating capability to the `wptserve` utility which
>  allows markup to be rendered with dynamically-computed hash values.
>  Allowing the shared resources to change independently of the tests that
>  rely on them.
>  ---
>  Hi @gsnedders,
>  I'm working on an enhancement to `testharness.js` (see gh-6075), and I found
>  that my latest patch broke a few tests (specifically, those introduced via
>  gh-7684). I was surprised to find that the error had nothing to do with the
>  semantics of my change--just the fact that I had made any change at all.
>  This is an initial attempt to facilitate continued development of
>  `testharness.js`. It's pretty rough because it's based on an afternoon's review
>  of the `wptserve` internals. I'm requesting your review because I believe you
>  may have some vision for the overall direction of WPT's server. If you think
>  there is someone better to give direction, then I'm all ears!
>  (@annevk and @domenic: my hope is that if this lands, future tests that require
>  strict file integrity checking can be a little more resilient to change.)
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Pushed by
[wpt PR 8735] - [wptserve] Add on-demand file hash computation, a=testonly
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.