blob: 1b24e5dfd996f59b6009fb723c79d4150f96c705 [file] [log] [blame]
<html manifest="resources/404-resource.manifest">
<body>
<p>Test that a missing explicit resource makes caching fail.</p>
<p>Should say SUCCESS:</p>
<div id=result></div>
<script>
if (window.testRunner) {
testRunner.dumpAsText()
testRunner.waitUntilDone();
}
function log(message)
{
document.getElementById("result").innerHTML += message + "<br>";
}
function unexpectedCallback(eventName)
{
log("FAIL: An unexpected " + eventName + " event was dispatched on window.applicationCache.");
}
function test()
{
if (applicationCache.status == applicationCache.UNCACHED)
log("SUCCESS");
else
log("FAILURE: cache status is not uncached: " + applicationCache.status);
if (window.testRunner)
testRunner.notifyDone();
}
applicationCache.addEventListener('cached', function() { unexpectedCallback("cached"); cacheCallback() }, false);
applicationCache.addEventListener('noupdate', function() { unexpectedCallback("noupdate"); cacheCallback() }, false);
applicationCache.addEventListener('error', test, false);
</script>
</body>
</html>