Index: LayoutTests/http/tests/appcache/modified-manifest.html |
diff --git a/LayoutTests/http/tests/appcache/modified-manifest.html b/LayoutTests/http/tests/appcache/modified-manifest.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f31d7e6c82a668732382df11fa34f59dabe67a54 |
--- /dev/null |
+++ b/LayoutTests/http/tests/appcache/modified-manifest.html |
@@ -0,0 +1,34 @@ |
+<html manifest="resources/modified-manifest.php"> |
+<script src="/js-test-resources/js-test.js"></script> |
+<script> |
+var jsTestIsAsync = true; |
+description("Test that a manifest that changes during an update fails."); |
+ |
+var gotCheckingEvent = false; |
+function onChecking() { gotCheckingEvent = true; } |
+ |
+ |
+var gotDownloadingEvent = false; |
+function onDownloading() { gotDownloadingEvent = true; } |
+ |
+function onError(e) |
+{ |
+ shouldBeTrue("gotCheckingEvent"); |
+ shouldBeTrue("gotDownloadingEvent"); |
+ shouldBe("window.applicationCache.status", "applicationCache.UNCACHED"); |
+ |
+ event = e; |
+ shouldBeEqualToString("event.reason", "changed"); |
+ shouldBeEqualToString("event.url", ""); |
+ shouldBe("event.status", "0"); |
+ shouldBeTrue("'message' in event"); |
+ |
+ finishJSTest(); |
+} |
+ |
+applicationCache.addEventListener('checking', onChecking, false); |
+applicationCache.addEventListener('downloading', onDownloading, false); |
+applicationCache.addEventListener('error', onError, false); |
+ |
+</script> |
+</html> |