Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / appcache / update-cache.html
blobdf631300af8969e8f56394bf0b08d4aa65f98ee8
1 <html manifest="resources/versioned-manifest.php">
2 <body>
3 <p>Test a simple offline application self-update process. Should print a series of messages followed with DONE:</p>
4 <div id=result></div>
6 <script>
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.waitUntilDone();
12 function log(message)
14 document.getElementById("result").innerHTML += message + "<br>";
17 function modifyManifest()
19 var req = new XMLHttpRequest;
20 req.open("GET", "resources/versioned-manifest.php?command=step", false);
21 req.send(false);
24 function test()
26 modifyManifest();
28 applicationCache.oncached = function() { log("FAIL: Unexpected cached event") }
29 applicationCache.onnoupdate = function() { log("FAIL: Unexpected noupdate event") }
30 applicationCache.onupdateready = function() { setTimeout(test2, 0) }
32 log("Updating cache group...");
33 setTimeout("applicationCache.update()", 0);
36 function test2()
38 log((applicationCache.status == applicationCache.UPDATEREADY) ? "Cache status is UPDATEREADY" : ("FAIL: Incorrect cache status, " + applicationCache.status));
40 modifyManifest();
41 applicationCache.onupdateready = function() { setTimeout(test3, 0) }
43 log("Updating cache group once more...");
44 setTimeout("applicationCache.update()", 0);
47 function test3()
49 log((applicationCache.status == applicationCache.UPDATEREADY) ? "Cache status is UPDATEREADY" : ("FAIL: Incorrect cache status, " + applicationCache.status));
51 log("Associating document with the newest cache version...");
52 applicationCache.swapCache();
54 log((applicationCache.status == applicationCache.IDLE) ? "Cache status is IDLE" : ("FAIL: Incorrect cache status, " + applicationCache.status));
56 log("DONE");
57 if (window.testRunner)
58 testRunner.notifyDone();
61 applicationCache.oncached = test;
62 applicationCache.onnoupdate = test;
63 applicationCache.onupdateready = function() { log("FAIL: Unexpected updateready event") }
64 applicationCache.onerror = function() { log("FAIL: Unexpected error event") }
65 applicationCache.onobsolete = function() { log("FAIL: Unexpected obsolete event") }
67 </script>
68 </body>
69 </html>