1<html manifest="resources/foreign-iframe.manifest"> <!-- Any manifest would do the trick. --> 2<body> 3<p>Test for <a href="rdar://problem/6284708"><rdar://problem/6284708></a> AppCache crashes in ApplicationCacheResource::addType().</p> 4 5<div id=result></div> 6 7<script> 8if (window.layoutTestController) { 9 layoutTestController.dumpAsText(); 10 layoutTestController.waitUntilDone(); 11} 12 13function log(message) 14{ 15 document.getElementById("result").innerHTML += message + "<br>"; 16} 17 18function test() 19{ 20 var ifr = document.createElement("iframe"); 21 ifr.setAttribute("src", "http://localhost:8000/appcache/resources/foreign-iframe.html"); 22 document.body.appendChild(ifr); 23} 24 25applicationCache.addEventListener('checking', function() { log("checking") }, false); 26applicationCache.addEventListener('error', function() { log("error") }, false); 27applicationCache.addEventListener('downloading', function() { log("downloading") }, false); 28applicationCache.addEventListener('progress', function() { log("progress") }, false); 29applicationCache.addEventListener('updateready', function() { log("updateready") }, false); 30applicationCache.addEventListener('obsolete', function() { log("obsolete") }, false); 31 32applicationCache.addEventListener('noupdate', function() { log("noupdate"); test() }, false); 33applicationCache.addEventListener('cached', function() { log("cached"); test() }, false); 34 35window.addEventListener("message", function() { log("SUCCESS"); if (window.layoutTestController) layoutTestController.notifyDone() }, false); 36 37</script> 38</body> 39</html> 40