diff --git a/fetch/metadata/resources/record-header.py b/fetch/metadata/resources/record-header.py index 05b60eba13b1cf..a9666033449f63 100644 --- a/fetch/metadata/resources/record-header.py +++ b/fetch/metadata/resources/record-header.py @@ -122,20 +122,6 @@ def main(request, response): response.headers.set(b"Content-Type", b"application/javascript") return b"self.postMessage('loaded');" - ## Return an appcache manifest - if key.startswith(b"appcache-manifest"): - response.headers.set(b"Content-Type", b"text/cache-manifest") - return b"""CACHE MANIFEST -/fetch/metadata/resources/record-header.py?file=appcache-resource%s - -NETWORK: -*""" % key[17:] - - ## Return an appcache resource - if key.startswith(b"appcache-resource"): - response.headers.set(b"Content-Type", b"text/html") - return b"Appcache!" - ## Return a valid XSLT if key.startswith(b"xslt"): response.headers.set(b"Content-Type", b"text/xsl") diff --git a/html/browsers/offline/appcache/appcache-iframe.https.html b/html/browsers/offline/appcache/appcache-iframe.https.html deleted file mode 100644 index 8e72664371540f..00000000000000 --- a/html/browsers/offline/appcache/appcache-iframe.https.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - diff --git a/html/browsers/offline/appcache/resources/appcache-data.py b/html/browsers/offline/appcache/resources/appcache-data.py deleted file mode 100644 index c364bff4e03b80..00000000000000 --- a/html/browsers/offline/appcache/resources/appcache-data.py +++ /dev/null @@ -1,5 +0,0 @@ -def main(request, response): - type = request.GET[b'type'] - if request.GET[b'type'] == b'fallingback': - return 404, [(b'Content-Type', b'text/plain')], u"Page not found" - return [(b'Content-Type', b'text/plain')], type diff --git a/html/browsers/offline/appcache/resources/appcache-iframe.manifest b/html/browsers/offline/appcache/resources/appcache-iframe.manifest deleted file mode 100644 index 7221e909c6fe6d..00000000000000 --- a/html/browsers/offline/appcache/resources/appcache-iframe.manifest +++ /dev/null @@ -1,8 +0,0 @@ -CACHE MANIFEST - -appcache-iframe.py?type=cached -appcache-data.py?type=cached - -FALLBACK: -appcache-iframe.py?type=fallingback appcache-iframe.py?type=fallbacked -appcache-data.py?type=fallingback appcache-data.py?type=fallbacked diff --git a/html/browsers/offline/appcache/resources/appcache-iframe.py b/html/browsers/offline/appcache/resources/appcache-iframe.py deleted file mode 100644 index 6a5fd594ff8873..00000000000000 --- a/html/browsers/offline/appcache/resources/appcache-iframe.py +++ /dev/null @@ -1,43 +0,0 @@ -script = b''' - -''' - -def main(request, response): - type = request.GET[b'type'] - if request.GET[b'type'] == b'fallingback': - return 404, [(b'Content-Type', b'text/plain')], u"Page not found" - return [(b'Content-Type', b'text/html')], script % type diff --git a/html/browsers/offline/appcache/workers/appcache-worker.https.html b/html/browsers/offline/appcache/workers/appcache-worker.https.html deleted file mode 100644 index 96fe5f2b7d22c1..00000000000000 --- a/html/browsers/offline/appcache/workers/appcache-worker.https.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - diff --git a/html/browsers/offline/appcache/workers/resources/appcache-dedicated-worker-not-in-cache.js b/html/browsers/offline/appcache/workers/resources/appcache-dedicated-worker-not-in-cache.js deleted file mode 100644 index d4ed500496b45b..00000000000000 --- a/html/browsers/offline/appcache/workers/resources/appcache-dedicated-worker-not-in-cache.js +++ /dev/null @@ -1 +0,0 @@ -postMessage('Done'); diff --git a/html/browsers/offline/appcache/workers/resources/appcache-shared-worker-not-in-cache.js b/html/browsers/offline/appcache/workers/resources/appcache-shared-worker-not-in-cache.js deleted file mode 100644 index 303595ca37606d..00000000000000 --- a/html/browsers/offline/appcache/workers/resources/appcache-shared-worker-not-in-cache.js +++ /dev/null @@ -1,64 +0,0 @@ -var info = ''; - -var initPromise = new Promise(resolve => { - self.addEventListener('connect', event => { - self.postMessage = msg => { event.ports[0].postMessage(msg); }; - resolve(); - }); -}); - -function importNotInCacheSciptTest() { - return new Promise((resolve, reject) => { - try { - importScripts('appcache-worker-import.py?type=not-in-cache'); - } catch(e) { - reject(new Error('Error while importing the not-in-cache script: ' + - e.toString())); - return; - } - if (info != 'Set by the not-in-cache script') { - reject(new Error('The not-in-cache script was not correctly executed')); - } - resolve(); - }); -} - -function importFallbackSciptTest() { - return new Promise((resolve, reject) => { - try { - importScripts('appcache-worker-import.py?type=fallingback'); - reject(new Error('Importing a fallback script must fail.')); - } catch(e) { - resolve(); - } - }); -} - -function fetchNotInCacheFileTest() { - return fetch('appcache-worker-data.py?type=not-in-cache') - .then(res => res.text(), - _ => { throw new Error('Failed to fetch not-in-cache file'); }) - .then(text => { - if (text != 'not-in-cache') { - throw new Error('not-in-cache file mismatch'); - } - }) -} - -function fetchFallbackFileTest() { - return fetch('appcache-worker-data.py?type=fallingback') - .then(res => { - if (res.status != 404) { - throw new Error( - 'Fetching fallback file must resolve with 404 response'); - } - }, - _ => { throw new Error('Fetching fallback file must not fail'); }); -} - -initPromise - .then(importNotInCacheSciptTest) - .then(importFallbackSciptTest) - .then(fetchNotInCacheFileTest) - .then(fetchFallbackFileTest) - .then(_ => postMessage('Done'), error => postMessage(error.toString())); diff --git a/html/browsers/offline/appcache/workers/resources/appcache-worker-data.py b/html/browsers/offline/appcache/workers/resources/appcache-worker-data.py deleted file mode 100644 index c364bff4e03b80..00000000000000 --- a/html/browsers/offline/appcache/workers/resources/appcache-worker-data.py +++ /dev/null @@ -1,5 +0,0 @@ -def main(request, response): - type = request.GET[b'type'] - if request.GET[b'type'] == b'fallingback': - return 404, [(b'Content-Type', b'text/plain')], u"Page not found" - return [(b'Content-Type', b'text/plain')], type diff --git a/html/browsers/offline/appcache/workers/resources/appcache-worker-import.py b/html/browsers/offline/appcache/workers/resources/appcache-worker-import.py deleted file mode 100644 index 73ccbc3d3988b0..00000000000000 --- a/html/browsers/offline/appcache/workers/resources/appcache-worker-import.py +++ /dev/null @@ -1,7 +0,0 @@ -script = b'info = \'Set by the %s script\';' - -def main(request, response): - type = request.GET[b'type'] - if request.GET[b'type'] == b'fallingback': - return 404, [(b'Content-Type', b'text/plain')], u"Page not found" - return [(b'Content-Type', b'text/javascript')], script % type diff --git a/html/browsers/offline/appcache/workers/resources/appcache-worker.manifest b/html/browsers/offline/appcache/workers/resources/appcache-worker.manifest deleted file mode 100644 index f369a766404c3f..00000000000000 --- a/html/browsers/offline/appcache/workers/resources/appcache-worker.manifest +++ /dev/null @@ -1,10 +0,0 @@ -CACHE MANIFEST - -appcache-worker.py?type=cached -appcache-worker-import.py?type=cached -appcache-worker-data.py?type=cached - -FALLBACK: -appcache-worker.py?type=fallingback appcache-worker.py?type=fallbacked -appcache-worker-import.py?type=fallingback appcache-worker-import.py?type=fallbacked -appcache-worker-data.py?type=fallingback appcache-worker-data.py?type=fallbacked diff --git a/html/browsers/offline/appcache/workers/resources/appcache-worker.py b/html/browsers/offline/appcache/workers/resources/appcache-worker.py deleted file mode 100644 index 4f990389e2b68a..00000000000000 --- a/html/browsers/offline/appcache/workers/resources/appcache-worker.py +++ /dev/null @@ -1,103 +0,0 @@ -script = b''' -var initPromise = Promise.resolve(); - -if ('SharedWorkerGlobalScope' in self && - self instanceof SharedWorkerGlobalScope) { - initPromise = new Promise(resolve => { - self.addEventListener('connect', event => { - self.postMessage = msg => { event.ports[0].postMessage(msg); }; - resolve(); - }); - }); -} - -var info = ''; - -function importCachedScriptTest() { - return new Promise((resolve, reject) => { - info = ''; - try { - importScripts('appcache-worker-import.py?type=cached'); - } catch(e) { - reject(new Error('Error while importing the cached script: ' + - e.toString())); - return; - } - if (info != 'Set by the cached script') { - reject(new Error('The cached script was not correctly executed')); - } - resolve(); - }); -} - -function importNotInCacheScriptTest() { - return new Promise((resolve, reject) => { - try { - importScripts('appcache-worker-import.py?type=not-in-cache'); - reject(new Error('Importing a non-cached script must fail.')); - } catch(e) { - resolve(); - } - }); -} - -function importFallbackScriptTest() { - return new Promise((resolve, reject) => { - info = ''; - try { - importScripts('appcache-worker-import.py?type=fallingback'); - } catch(e) { - reject(new Error('Error while importing the fallingback script: ' + - e.toString())); - } - if (info != 'Set by the fallbacked script') { - reject(new Error('The fallingback script was not correctly executed')); - } - resolve(); - }); -} - -function fetchCachedFileTest() { - return fetch('appcache-worker-data.py?type=cached') - .then(res => res.text(), - _ => { throw new Error('Failed to fetch cached file'); }) - .then(text => { - if (text != 'cached') { - throw new Error('cached file missmatch'); - } - }); -} - -function fetchNotInCacheFileTest() { - return fetch('appcache-worker-data.py?type=not-in-cache') - .then(_ => { throw new Error('Fetching not-in-cache file must fail'); }, - _ => {}); -} - -function fetchFallbackFileTest() { - return fetch('appcache-worker-data.py?type=fallingback') - .then(res => res.text(), - _ => { throw new Error('Failed to fetch fallingback file'); }) - .then(text => { - if (text != 'fallbacked') { - throw new Error('fallbacked file miss match'); - } - }); -} - -initPromise - .then(importCachedScriptTest) - .then(importNotInCacheScriptTest) - .then(importFallbackScriptTest) - .then(fetchCachedFileTest) - .then(fetchNotInCacheFileTest) - .then(fetchFallbackFileTest) - .then(_ => postMessage('Done: %s'), - error => postMessage(error.toString())); -''' - -def main(request, response): - type = request.GET[b'type'] - if request.GET[b'type'] == b'fallingback': - return 404, [(b'Content-Type', b'text/plain')], u"Page not found" - return [(b'Content-Type', b'text/javascript')], script % type diff --git a/html/browsers/offline/application-cache-api/api_status_idle.https.html b/html/browsers/offline/application-cache-api/api_status_idle.https.html deleted file mode 100644 index c55e4fc589f121..00000000000000 --- a/html/browsers/offline/application-cache-api/api_status_idle.https.html +++ /dev/null @@ -1,23 +0,0 @@ - - -
-