summaryrefslogtreecommitdiffstats
path: root/LayoutTests/http/tests/appcache/reload.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/http/tests/appcache/reload.html')
-rw-r--r--LayoutTests/http/tests/appcache/reload.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/LayoutTests/http/tests/appcache/reload.html b/LayoutTests/http/tests/appcache/reload.html
new file mode 100644
index 0000000..6e2da56
--- /dev/null
+++ b/LayoutTests/http/tests/appcache/reload.html
@@ -0,0 +1,40 @@
+<html>
+<body>
+<p>Test that the manifest is picked correctly when reloading.</p>
+<p>Should say SUCCESS:</p>
+<div id=result></div>
+
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+
+function log(message)
+{
+ document.getElementById("result").innerHTML += message + "<br>";
+}
+
+var state = 0;
+function receivedMessage(message)
+{
+ log(message);
+
+ if (state == 0) {
+ state = 1;
+ setTimeout("frames[0].location.reload()", 0);
+ } else if (state == 1) {
+ state = 2;
+ setTimeout("frames[0].test()", 0);
+ } else if (state == 2) {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+}
+
+window.addEventListener("message", function(e) { receivedMessage(e.data) }, false);
+
+</script>
+<iframe src="resources/reload-iframe.html"></iframe>
+</body>
+</html>