<html manifest="/appcache/resources/main-resource-hash-frame.manifest#foo">
<div id=result></div>
<script>
function log(message)
{
    document.getElementById("result").innerHTML += message + "<br>";
}

applicationCache.onchecking = function() { log("checking"); }
applicationCache.ondownloading = function() { log("downloading") }
applicationCache.onprogress = function() { log("progress") }
applicationCache.onupdateready = function() { log("updateready") }
applicationCache.onobsolete = function() { log("obsolete") }
applicationCache.oncached = function() { log("cached"); loaded(); }
applicationCache.onnoupdate = function() { log("noupdate"); loaded(); }
applicationCache.onerror = function() { log("error"); loaded(); }

var once = 1;
function loaded()
{
    if (once) {
        once = 0;
        parent.postMessage("loaded", "*");
    }
}
</script>
</html>
