gecko/dom/tests/mochitest/ajax/offline/updatingImplicit.html

48 lines
1.4 KiB
HTML

<html xmlns="http://www.w3.org/1999/xhtml" manifest="http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/updatingManifest.sjs">
<head>
<title>Updating implicit</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/dom/tests/mochitest/ajax/offline/offlineTests.js"></script>
<script type="text/javascript">
function manifestUpdated()
{
// Assert that we are properly associated with the application
// cache.
var req = new XMLHttpRequest;
req.open("GET", "namespace2/script3.js", false);
try {
req.send(null);
window.opener.OfflineTest.ok(false, "Able to fetch unlisted resource, not properly associated.");
} catch(ex) {
window.opener.OfflineTest.ok(true, "Unable to fetch unlisted resource, properly associated.");
}
window.opener.OfflineTest.checkCache("http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/updatingImplicit.html",
true);
window.opener.implicitLoaded(window, false);
}
function manifestError()
{
window.opener.implicitLoaded(window, true);
}
if (OfflineTest.setupChild()) {
applicationCache.onerror = OfflineTest.priv(manifestError);
applicationCache.onupdateready = OfflineTest.failEvent;
applicationCache.oncached = OfflineTest.failEvent;
applicationCache.onnoupdate = OfflineTest.priv(manifestUpdated);
}
</script>
</head>
<body>
</body>
</html>