blob: 510f8416b266d7c7343c8629366ae832b8c92e9e [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.layoutTestController) {
layoutTestController.dumpAsText()
layoutTestController.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.layoutTestController)
layoutTestController.notifyDone();
}
applicationCache.addEventListener('cached', cached, false);
applicationCache.addEventListener('noupdate', cached, false);
</script>
</html>