blob: 945b85e1df26d05b95ef592a0dacc578e164f1fd [file] [log] [blame]
<html manifest="access-via-redirect.manifest">
<p>This tests that the start of redirect chain doesn't get into an application cache if the end of the chain has a manifest.</p>
<p id="result">FAILURE</p>
<script>
if (window.testRunner) {
testRunner.dumpAsText()
testRunner.waitUntilDone();
}
function canLoad(url)
{
try {
var req = new XMLHttpRequest();
req.open("GET", url, false);
req.send("");
return true;
} catch (e) {
return false;
}
}
function cached()
{
if (canLoad("/appcache/access-via-redirect.php")) {
document.getElementById('result').innerHTML = "FAILURE: Start of redirect chain is in cache."
return;
}
if (!canLoad("access-via-redirect.html")) {
document.getElementById('result').innerHTML = "FAILURE: Could not load main resource from cache."
return;
}
document.getElementById('result').innerHTML = "SUCCESS"
if (window.testRunner)
testRunner.notifyDone();
}
applicationCache.addEventListener('cached', cached, false);
applicationCache.addEventListener('noupdate', cached, false);
</script>
</html>