Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: LayoutTests/http/tests/appcache/interrupted-update.html

Issue 40513003: Delete/move the remaining stale tests in TestExpectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: delete plugins/reentrant-update-widget-positions.html as well Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html manifest="resources/interrupted-update.manifest">
2 <p>Test that an application cache update works again after interruption.</p>
3 <pre id=log></pre>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
8 }
9
10 function log(msg)
11 {
12 document.getElementById("log").innerHTML += msg + "\n";
13 }
14
15 var haveReloaded = localStorage.getItem("appcache-interrupted-update-reloaded") == "YES";
16 localStorage.removeItem("appcache-interrupted-update-reloaded");
17
18 if (haveReloaded)
19 log("Reloaded");
20
21 function onchecking()
22 {
23 log("CHECKING");
24 }
25
26 function ondownloading()
27 {
28 log("DOWNLOADING");
29 }
30
31 function onprogress(event)
32 {
33 log("PROGRESS " + event.loaded + "/" + event.total);
34
35 if (!haveReloaded && event.loaded == 2) {
36 localStorage.setItem("appcache-interrupted-update-reloaded", "YES");
37 console.log("Reloading...");
38 window.location.reload();
39 }
40 }
41
42 function onnoupdate()
43 {
44 log("NOUPDATE");
45 log("\nFAIL - the cache was already present, so we couldn't test initial loa ding");
46 if (window.testRunner)
47 testRunner.notifyDone();
48 }
49
50 function oncached()
51 {
52 log("CACHED");
53 log("\nPASS");
54 if (window.testRunner)
55 testRunner.notifyDone();
56 }
57
58 function onerror()
59 {
60 log("ERROR");
61 log("\nFAIL");
62 if (window.testRunner)
63 testRunner.notifyDone();
64 }
65
66
67 applicationCache.addEventListener('checking', onchecking, false);
68 applicationCache.addEventListener('downloading', ondownloading, false);
69 applicationCache.addEventListener('progress', onprogress, false);
70 applicationCache.addEventListener('noupdate', onnoupdate, false);
71 applicationCache.addEventListener('cached', oncached, false);
72 applicationCache.addEventListener('error', onerror, false);
73
74 </script>
75
76 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698