| <html manifest="resources/abort-cache-ondownloading-resource-404.manifest"> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText() |
| testRunner.waitUntilDone(); |
| } |
| |
| function log(message) { |
| document.getElementById("result").innerHTML += message + "\n"; |
| } |
| |
| function ondownloading() { |
| applicationCache.abort(); |
| } |
| |
| function onnoupdate() { |
| log("FAILURE"); |
| log("noupdate"); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| function oncached() { |
| log("FAILURE"); |
| log("CACHED"); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| function onupdateready() { |
| log("FAILURE"); |
| log("UPDATEREADY"); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| function onerror() { |
| log("SUCCESS"); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| applicationCache.addEventListener('downloading', ondownloading, false); |
| applicationCache.addEventListener('noupdate', onnoupdate, false); |
| applicationCache.addEventListener('cached', oncached, false); |
| applicationCache.addEventListener('error', onerror, false); |
| applicationCache.addEventListener('updateready', onupdateready, false); |
| |
| </script> |
| |
| <div>This tests that download process was aborted after downloading event although resource was not found.</div> |
| <div id="result"></div> |
| </html> |
| |