2010-03-12 13:53:36 -08:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" manifest="http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/updatingManifest.sjs">
|
2008-11-05 16:01:06 -08:00
|
|
|
<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()
|
|
|
|
{
|
2009-02-22 11:09:10 -08:00
|
|
|
// 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.");
|
|
|
|
}
|
|
|
|
|
2009-03-10 14:58:00 -07:00
|
|
|
req = new XMLHttpRequest;
|
|
|
|
req.open("GET", "updatingImplicit.html", false);
|
|
|
|
try {
|
|
|
|
req.send(null);
|
|
|
|
window.opener.OfflineTest.ok(true, "Able to fetch listed resource, properly associated.");
|
|
|
|
} catch(ex) {
|
|
|
|
window.opener.OfflineTest.ok(false, "Unable to fetch listed resource, not properly associated.");
|
|
|
|
}
|
2009-02-22 11:09:10 -08:00
|
|
|
|
2008-11-05 16:01:06 -08:00
|
|
|
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>
|