blob: 80202d1e7404e3d16b2a73ec38a573c095fc8b41 [file] [log] [blame]
<html manifest="resources/abort-cache-onprogress.manifest">
<script>
if (window.testRunner) {
testRunner.dumpAsText()
testRunner.waitUntilDone();
}
function log(message) {
document.getElementById("result").innerHTML += message + "\n";
}
function onprogress(event) {
log("loading resource: " + event.loaded + " / " + event.total);
if (event.loaded == 3)
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('noupdate', onnoupdate, false);
applicationCache.addEventListener('cached', oncached, false);
applicationCache.addEventListener('error', onerror, false);
applicationCache.addEventListener('updateready', onupdateready, false);
applicationCache.addEventListener('progress', onprogress, false);
</script>
<div>This tests that download process was aborted after progress event.</div>
<div id="result"></div>
</html>