blob: e5a26a1b529f2223f4e7c59233858045689cfd25 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src='../resources/runner.js'></script>
</head>
<body>
<script>
function runTest() {
navigator.serviceWorker.addEventListener('message', (msg) => {
PerfTestRunner.recordResultFromWorker(msg.data);
});
const script =
'/service_worker/resources/cache-keys-service-worker.js';
const scope = '/service_worker/resources/';
navigator.serviceWorker.register(script, { scope: scope }).catch((error) => {
PerfTestRunner.logFatalError(
'Failed to register service worker script:' + script);
});
return;
}
PerfTestRunner.startMeasureValuesInWorker({
description: 'Measure performance of Cache.keys().',
unit: 'ms',
run: runTest
});
</script>
</body>
</html>