Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / appcache / resources / xhr-foreign-resource-frame.html
blob57093fa679790e23ffbe46cb63a31a7391c5a56e
1 <html manifest="xhr-foreign-resource-2.manifest">
2 <body>
3 <div id=result></div>
4 <script>
5 function log(message)
7 document.getElementById("result").innerHTML += message + "<br>";
10 function cached()
12 applicationCache.onnoupdate = null;
13 applicationCache.oncached = null;
15 // simple.txt is only listed s a resource in main frame's manifest, so loading should fail.
16 try {
17 var req = new XMLHttpRequest;
18 req.open("GET", "simple.txt", false);
19 req.send("");
20 log("FAIL");
21 log("applicationCache.status = " + applicationCache.status);
22 parent.postMessage("FAIL", "*");
23 } catch (ex) {
24 log("Frame OK");
25 parent.postMessage("SUCCESS", "*");
29 applicationCache.onnoupdate = cached;
30 applicationCache.oncached = cached;
32 applicationCache.onupdateready = function() { log("FAIL: received unexpected updateready event") }
33 applicationCache.onerror = function() { log("FAIL: received unexpected error event") }
34 </script>
35 </body>
36 </html>