OLD | NEW |
(Empty) | |
| 1 <html manifest="resources/modified-manifest.php"> |
| 2 <script src="/js-test-resources/js-test.js"></script> |
| 3 <script> |
| 4 var jsTestIsAsync = true; |
| 5 description("Test that a manifest that changes during an update fails."); |
| 6 |
| 7 var gotCheckingEvent = false; |
| 8 function onChecking() { gotCheckingEvent = true; } |
| 9 |
| 10 |
| 11 var gotDownloadingEvent = false; |
| 12 function onDownloading() { gotDownloadingEvent = true; } |
| 13 |
| 14 function onError(e) |
| 15 { |
| 16 shouldBeTrue("gotCheckingEvent"); |
| 17 shouldBeTrue("gotDownloadingEvent"); |
| 18 shouldBe("window.applicationCache.status", "applicationCache.UNCACHED"); |
| 19 |
| 20 event = e; |
| 21 shouldBeEqualToString("event.reason", "changed"); |
| 22 shouldBeEqualToString("event.url", ""); |
| 23 shouldBe("event.status", "0"); |
| 24 shouldBeTrue("'message' in event"); |
| 25 |
| 26 finishJSTest(); |
| 27 } |
| 28 |
| 29 applicationCache.addEventListener('checking', onChecking, false); |
| 30 applicationCache.addEventListener('downloading', onDownloading, false); |
| 31 applicationCache.addEventListener('error', onError, false); |
| 32 |
| 33 </script> |
| 34 </html> |
OLD | NEW |