| 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..e56c65d4274925f6d4ee5a42c96d3cfefa23a9d6
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/appcache/404-resource-cross-origin.html
|
| @@ -0,0 +1,36 @@
|
| +<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;
|
| + shouldBeTrue("'reason' in event");
|
| + shouldBeTrue("'url' in event");
|
| + shouldBeTrue("'status' in event");
|
| + shouldBeTrue("'message' in event");
|
| +
|
| + 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>
|
|
|