summaryrefslogtreecommitdiffstats
path: root/LayoutTests/http/tests/appcache/resources/subframe-4.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/http/tests/appcache/resources/subframe-4.html')
-rw-r--r--LayoutTests/http/tests/appcache/resources/subframe-4.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/LayoutTests/http/tests/appcache/resources/subframe-4.html b/LayoutTests/http/tests/appcache/resources/subframe-4.html
new file mode 100644
index 0000000..da03679
--- /dev/null
+++ b/LayoutTests/http/tests/appcache/resources/subframe-4.html
@@ -0,0 +1,26 @@
+<html manifest="subframes-4.manifest">
+<script>
+function test()
+{
+ applicationCache.onnoupdate = null;
+
+ try {
+ var req = new XMLHttpRequest;
+ req.open("GET", "simple.txt", false);
+ req.send(null);
+ alert("FAIL, unexpected response: " + req.responseText);
+ } catch (ex) {
+ // Loading should fail, because simple.txt is not in cache manifest.
+ parent.postMessage("allDone", "*");
+ }
+}
+
+// The cache has been fully created before the iframe was inserted, and the manifest didn't change.
+applicationCache.onnoupdate = test;
+
+applicationCache.onupdateready = function() { alert("Unexpected updateready event") }
+applicationCache.oncached = function() { alert("Unexpected cached event") }
+applicationCache.onerror = function() { alert("Unexpected error event") }
+
+</script>
+</html>