tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / http / tests / appcache / wrong-content-type.html
1 <html manifest="resources/wrong-content-type.manifest">
2 <body>
3 <p>Test that a manifest served with an arbitrary content-type is OK.</p>
4 <p>Should say SUCCESS:</p>
5 <div id=result></div>
6 <script>
7 if (window.layoutTestController) {
8     layoutTestController.dumpAsText()
9     layoutTestController.waitUntilDone();
10 }
11
12 function log(message)
13 {
14     document.getElementById("result").innerHTML += message + "<br>";
15 }
16
17 function errorEventListener()
18 {
19     log("FAILURE: An error event was dispatched on window.applicationCache.");
20     if (window.layoutTestController)
21         layoutTestController.notifyDone();
22 }
23
24 function verifyStatus()
25 {
26     if (window.applicationCache.status != window.applicationCache.IDLE)
27         log("FAILURE: Unexpected cache status: " + window.applicationCache.status);
28     else
29         log("SUCCESS");
30
31     if (window.layoutTestController)
32         layoutTestController.notifyDone();
33 }
34
35 applicationCache.addEventListener('cached', verifyStatus, false);
36 applicationCache.addEventListener('noupdate', verifyStatus, false);
37 applicationCache.addEventListener('error', errorEventListener, false);
38
39 </script>
40 </body>
41 </html>