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

47 lines
1.1 KiB
HTML

<html>
<head>
<title>Test missing manifest</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript">
var gTestWin;
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var Cc = Components.classes;
var Ci = Components.interfaces;
// Enable the offline-app permission before loading the new window
var pm = Cc["@mozilla.org/permissionmanager;1"]
.getService(Ci.nsIPermissionManager);
var uri = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService)
.newURI(window.location.href, null, null);
pm.add(uri, "offline-app", Ci.nsIPermissionManager.ALLOW_ACTION);
// now this will properly load the manifest.
gTestWin = window.open("missing.html");
function finish()
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
pm.remove(uri.asciiHost, "offline-app");
gTestWin.close();
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
</script>
</head>
<body>
</body>
</html>