LayoutTests/http/tests/appcache/abort-cache-onchecking-manifest-404.html is flaky
[WebKit-https.git] / LayoutTests / http / tests / appcache / abort-cache-onchecking-manifest-404.html
1 <html manifest="resources/not-exist.vob.php">
2 <script>
3 if (window.testRunner) {
4     testRunner.dumpAsText()
5     testRunner.waitUntilDone();
6 }
7
8 function log(message) {
9     document.getElementById("result").innerHTML += message + "\n";
10 }
11
12 function onchecking() {
13     applicationCache.abort(); 
14 }
15
16 function onnoupdate() {
17     log("FAILURE");
18     log("noupdate");
19     if (window.testRunner)
20         testRunner.notifyDone();
21 }
22
23 function oncached() {
24     log("FAILURE");
25     log("CACHED");
26     if (window.testRunner)
27         testRunner.notifyDone();
28 }
29
30 function onupdateready() {
31     log("FAILURE");
32     log("UPDATEREADY");
33     if (window.testRunner)
34         testRunner.notifyDone();
35 }
36
37 function onerror() {
38     log("SUCCESS");
39     if (window.testRunner)
40         testRunner.notifyDone();
41 }
42
43 applicationCache.addEventListener('checking', onchecking, false);
44 applicationCache.addEventListener('noupdate', onnoupdate, false);
45 applicationCache.addEventListener('cached', oncached, false);
46 applicationCache.addEventListener('error', onerror, false);
47 applicationCache.addEventListener('updateready', onupdateready, false);
48
49 </script>
50
51 <div>This tests that download process was aborted after checking event and before update failed.</div>
52 <div id="result"></div>
53 </html>
54