Files
firefox/testing/web-platform/tests/server-timing/service_worker_idl.https.html
T
Jinho Bang 944baaab74 Bug 1468336 [wpt PR 11474] - ServiceWorker: Use [SecureContext] instead of manual check, a=testonly
Automatic update from web-platform-testsServiceWorker: Use [SecureContext] instead of manual check

Until now, we had to use IsSecureContext() to check whether an execution
context is a secure context manually. But we can use [SecureContext]
instead of the manual check now. After this change, all related APIs
including ServiceWorkerContainer will not be exposed in non-secure
context.

Chrome status: https://www.chromestatus.com/feature/4835970390163456

Bug: 542499, 854058
Change-Id: I0e207fee5c591d595c0e11c121cc8a0f555b5be3
Reviewed-on: https://chromium-review.googlesource.com/818666
Commit-Queue: Jinho Bang <[email protected]>
Reviewed-by: Matt Falkenhagen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#568509}

--

wpt-commits: dc2cc220fecd1ee280471c6de4a50d279285b9b6
wpt-pr: 11474
2018-07-11 07:54:19 +01:00

19 lines
561 B
HTML

<!DOCTYPE html>
<head>
<meta charset='utf-8' />
<script src="/resources/testharness.js"></script>
<script src='/resources/testharnessreport.js'></script>
<script>
(async () => {
const scope = 'does/not/exist'
let registration = await navigator.serviceWorker.getRegistration(scope)
if (registration)
await registration.unregister()
registration = await navigator.serviceWorker.register('./sw.js', {scope})
fetch_tests_from_worker(registration.installing)
})()
</script>
</head>