OLD | NEW |
(Empty) | |
| 1 <html manifest="resources/404-resource-cross-origin.manifest"> |
| 2 <script src="/js-test-resources/js-test.js"></script> |
| 3 <script> |
| 4 var jsTestIsAsync = true; |
| 5 description("Test that a missing cross-origin resource failure doesn't leak deta
ils."); |
| 6 |
| 7 function unexpectedCallback(eventName) |
| 8 { |
| 9 testFailed("An unexpected " + eventName + " event was dispatched on window.a
pplicationCache."); |
| 10 finishJSTest(); |
| 11 } |
| 12 |
| 13 function test(e) |
| 14 { |
| 15 shouldBe("applicationCache.status", "applicationCache.UNCACHED"); |
| 16 |
| 17 event = e; |
| 18 shouldBeEqualToString("event.reason", "resource"); |
| 19 shouldBeEqualToString("event.url", "http://127.0.0.1/does-not-exist.txt"); |
| 20 shouldBe("event.status", "0"); |
| 21 shouldBeEqualToString("event.message", ""); |
| 22 |
| 23 finishJSTest(); |
| 24 } |
| 25 |
| 26 applicationCache.addEventListener('cached', function() { unexpectedCallback("cac
hed"); }, false); |
| 27 applicationCache.addEventListener('noupdate', function() { unexpectedCallback("n
oupdate"); }, false); |
| 28 applicationCache.addEventListener('error', test, false); |
| 29 |
| 30 </script> |
| 31 </html> |
OLD | NEW |