summaryrefslogtreecommitdiffstats
path: root/LayoutTests/http/tests/appcache/different-origin-manifest.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/http/tests/appcache/different-origin-manifest.html')
-rw-r--r--LayoutTests/http/tests/appcache/different-origin-manifest.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/LayoutTests/http/tests/appcache/different-origin-manifest.html b/LayoutTests/http/tests/appcache/different-origin-manifest.html
new file mode 100644
index 0000000..b58c10a
--- /dev/null
+++ b/LayoutTests/http/tests/appcache/different-origin-manifest.html
@@ -0,0 +1,36 @@
+<html manifest="http://localhost:8000/appcache/resources/empty.manifest">
+<p>Test that a different origin manifest is completely ignored.</p>
+<div id=result></div>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.dumpAsText();
+}
+
+var result = document.getElementById("result");
+var originalResult = result.innerHTML;
+
+try {
+ applicationCache.onchecking = function() { result.innerHTML += "FAIL: onchecking called. " }
+ applicationCache.onerror = function() { result.innerHTML += "FAIL: onerror called" }
+ applicationCache.onnoupdate = function() { result.innerHTML += "FAIL: onnoupdate called" }
+ applicationCache.ondownloading = function() { result.innerHTML += "FAIL: ondownloading called" }
+ applicationCache.onprogress = function() { result.innerHTML += "FAIL: onprogress called" }
+ applicationCache.onupdateready = function() { result.innerHTML += "FAIL: onupdateready called" }
+ applicationCache.oncached = function() { result.innerHTML += "FAIL: oncached called" }
+ applicationCache.onobsolete = function() { result.innerHTML += "FAIL: onobsolete called" }
+} catch (ex) {
+ result.innerHTML += "FAIL: " + ex;
+}
+function done()
+{
+ if (result.innerHTML == originalResult)
+ result.innerHTML = applicationCache.status == applicationCache.UNCACHED ? "PASS" : "FAIL: cache status in not UNCACHED";
+
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+
+setTimeout(done, 100);
+</script>
+</html>