Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / appcache / foreign-iframe-main.html
blob5ba687f8cf4894257a74ce58739af603451306cb
1 <html manifest="resources/foreign-iframe.manifest"> <!-- Any manifest would do the trick. -->
2 <body>
3 <p>Test for <a href="rdar://problem/6284708">&lt;rdar://problem/6284708></a> AppCache crashes in ApplicationCacheResource::addType().</p>
5 <div id=result></div>
7 <script>
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 testRunner.waitUntilDone();
13 function log(message)
15 document.getElementById("result").innerHTML += message + "<br>";
18 function test()
20 var ifr = document.createElement("iframe");
21 ifr.setAttribute("src", "http://localhost:8000/appcache/resources/foreign-iframe.html");
22 document.body.appendChild(ifr);
25 applicationCache.addEventListener('checking', function() { log("checking") }, false);
26 applicationCache.addEventListener('error', function() { log("error") }, false);
27 applicationCache.addEventListener('downloading', function() { log("downloading") }, false);
28 applicationCache.addEventListener('progress', function() { log("progress") }, false);
29 applicationCache.addEventListener('updateready', function() { log("updateready") }, false);
30 applicationCache.addEventListener('obsolete', function() { log("obsolete") }, false);
32 applicationCache.addEventListener('noupdate', function() { log("noupdate"); test() }, false);
33 applicationCache.addEventListener('cached', function() { log("cached"); test() }, false);
35 window.addEventListener("message", function() { log("SUCCESS"); if (window.testRunner) testRunner.notifyDone() }, false);
37 </script>
38 </body>
39 </html>