https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 8c228b827f2f7d2d317a13f48ff6022b0da5b10a authored by Luke Bjerring on 20 July 2018, 17:32:08 UTC
Try to automate u2f authentication, with vendor-specific implementations of what 'authenticate_u2f' would be.
Tip revision: 8c228b8
sw.js
importScripts('/resources/testharness.js')

promise_test((test) => {
  return fetch('./sw.js').then((response) => {
    return new Promise((resolve, reject) => {
      step_timeout(() => {
        const entry = performance.getEntriesByName(response.url)[0]
        if (!entry) {
          reject('no entry: ' + response.url)
        }

        assert_not_equals(typeof entry.serverTiming,
          'undefined',
          'An instance of `PerformanceResourceTiming` should have a `serverTiming` attribute in the Service Worker context.')
        resolve()
      }, 250)
    })
  })
})
back to top