Index: LayoutTests/http/tests/appcache/404-resource-cross-origin.html |
diff --git a/LayoutTests/http/tests/appcache/404-resource-cross-origin.html b/LayoutTests/http/tests/appcache/404-resource-cross-origin.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a80e47f7ae9ede0f20367ff2ee6b9fe8807db383 |
--- /dev/null |
+++ b/LayoutTests/http/tests/appcache/404-resource-cross-origin.html |
@@ -0,0 +1,31 @@ |
+<html manifest="resources/404-resource-cross-origin.manifest"> |
+<script src="/js-test-resources/js-test.js"></script> |
+<script> |
+var jsTestIsAsync = true; |
+description("Test that a missing cross-origin resource failure doesn't leak details."); |
+ |
+function unexpectedCallback(eventName) |
+{ |
+ testFailed("An unexpected " + eventName + " event was dispatched on window.applicationCache."); |
+ finishJSTest(); |
+} |
+ |
+function test(e) |
+{ |
+ shouldBe("applicationCache.status", "applicationCache.UNCACHED"); |
+ |
+ event = e; |
+ shouldBeEqualToString("event.reason", "resource"); |
+ shouldBeEqualToString("event.url", "http://127.0.0.1/does-not-exist.txt"); |
+ shouldBe("event.status", "0"); |
+ shouldBeEqualToString("event.message", ""); |
+ |
+ finishJSTest(); |
+} |
+ |
+applicationCache.addEventListener('cached', function() { unexpectedCallback("cached"); }, false); |
+applicationCache.addEventListener('noupdate', function() { unexpectedCallback("noupdate"); }, false); |
+applicationCache.addEventListener('error', test, false); |
+ |
+</script> |
+</html> |