blob: 9389cd53574e738f6d478141dceb4d9f567f0a96 [file] [log] [blame]
<html>
<body>
<p>Test to ensure the the window.applicationCache attribute is defined but non-functional with the feature disabled.</p>
<div id=result></div>
<script>
if (window.testRunner) {
testRunner.overridePreference("WebKitOfflineWebApplicationCacheEnabled", false);
testRunner.dumpAsText();
}
function log(message)
{
document.getElementById("result").innerHTML += message + "<br>";
}
function isDefined() {
if (window.applicationCache)
return true;
else
return false;
}
function statusIsUncached() {
return applicationCache.status == 0;
}
function swapThrows() {
try {
applicationCache.swapCache();
return false;
} catch(e) {
return true;
}
}
function updateThrows() {
try {
applicationCache.swapCache();
return false;
} catch(e) {
return true;
}
}
if (isDefined() && statusIsUncached() && swapThrows() && updateThrows())
log("SUCCESS");
else
log("FAILURE");
</script>
</body>
</html>