mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-11-04 10:05:51 +00:00
32 lines
784 B
HTML
32 lines
784 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Test app for bug 1161684</title>
|
|
<script src='test.js'></script>
|
|
<script type='application/javascript;version=1.7'>
|
|
function registerServiceWorker() {
|
|
return new Promise((resolve, reject) => {
|
|
navigator.serviceWorker.ready.then(() => {
|
|
resolve();
|
|
});
|
|
navigator.serviceWorker.register('sw.js', {scope: '.'})
|
|
.then(registration => {
|
|
ok(true, 'service worker registered');
|
|
})
|
|
.catch(reject);
|
|
});
|
|
}
|
|
|
|
function runTests() {
|
|
return Promise.resolve()
|
|
.then(() => { return testFetchAppResource('foo.txt',
|
|
'networkresponse'); })
|
|
.then(registerServiceWorker)
|
|
.then(ready);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload='runTests()'>
|
|
</body>
|
|
</html>
|