tenfourfox/dom/tests/mochitest/ajax/offline/updatingImplicit.html
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

54 lines
1.6 KiB
HTML

<html xmlns="http://www.w3.org/1999/xhtml" manifest="http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/updatingManifest.sjs">
<head>
<title>Updating implicit</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.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.");
}
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.");
}
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>