tenfourfox/dom/workers/test/serviceworkers/app-protocol/controlled.html
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

37 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Test app for bug 1161684</title>
<script src='test.js'></script>
<script src='test_doc_load_interception.js'></script>
<script type='application/javascript;version=1.7'>
function runTests() {
return Promise.resolve()
.then(navigator.serviceWorker.ready)
.then(() => {
return testFetchAppResource('foo.txt',
'swresponse', 'text/plain');
})
.then(() => {
return testFetchAppResource('foo.txt?fetch=1',
'networkresponse', 'text/plain');
})
.then(() => {
return testFetchAppResource('test_custom_content_type',
'customContentType', 'text/html');
})
// XXX: Cross-origin interceptions without CORS result in opaque responses
// which are illegal for navigations like iframes. (bug 1183313)
//.then(testRedirectedResponse)
//.then(testRedirectedHttpsResponse)
//.then(testCachedRedirectedResponse)
//.then(testCachedRedirectedHttpsResponse)
.then(done);
}
</script>
</head>
<body onload='runTests()'>
</body>
</html>