diff options
Diffstat (limited to 'LayoutTests/http/tests/appcache/resources/remove-cache-frame-2.html')
-rw-r--r-- | LayoutTests/http/tests/appcache/resources/remove-cache-frame-2.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/LayoutTests/http/tests/appcache/resources/remove-cache-frame-2.html b/LayoutTests/http/tests/appcache/resources/remove-cache-frame-2.html new file mode 100644 index 0000000..009a8b6 --- /dev/null +++ b/LayoutTests/http/tests/appcache/resources/remove-cache-frame-2.html @@ -0,0 +1,37 @@ +<html manifest="fail-on-update.php"> +<body> +<div id=result></div> +<script> +function log(message) +{ + document.getElementById("result").innerHTML += message + "<br>"; +} + +function test() +{ + log("cached") + log("status=" + applicationCache.status); + applicationCache.onnoupdate = null; + + // Associated to a cache, so loading should fail + try { + var req = new XMLHttpRequest; + req.open("GET", "empty.txt", false); + req.send(null); + alert("FAIL: XMLHttpRequest for an uncached resource didn't raise an exception"); + } catch (ex) { + } + log("There should be no messages below."); + parent.postMessage("frameDone", "*"); +} + +applicationCache.onupdateready = function() { log("updateready"); alert("Unexpected onupdateready event in frame") } +applicationCache.onerror = function() { log("error"); alert("Unexpected error event in frame") } +applicationCache.onnoupdate = function() { log("noupdate"); alert("Unexpected noupdate event in frame") } +applicationCache.onobsolete = function() { log("obsolete"); alert("Unexpected obsolete event in frame") } + +applicationCache.oncached = test; + +</script> +</body> +</html> |