blob: ef0f9a94286c92ad1d44cbf7c6de0852c045db2e [file] [log] [blame]
<html manifest="resources/foreign-iframe.manifest"> <!-- Any manifest would do the trick. -->
<!--
Generate this token with the command:
tools/origin_trials/generate_token.py http://127.0.0.1:8000 AppCache --expire-days=2000
-->
<meta http-equiv="origin-trial" content="AnwB3aSh6U8pmYtO/AzzxELSwk8BRJoj77nUnCq6u3N8LMJKlX/ImydQmXn3SgE0a+8RyowLbV835tXQHJMHuAEAAABQeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiQXBwQ2FjaGUiLCAiZXhwaXJ5IjogMTc2MTE3NjE5OH0=">
<body>
<p>Test for <a href="rdar://problem/6284708">&lt;rdar://problem/6284708></a> AppCache crashes in ApplicationCacheResource::addType().</p>
<div id=result></div>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function log(message)
{
document.getElementById("result").innerHTML += message + "<br>";
}
function test()
{
var ifr = document.createElement("iframe");
ifr.setAttribute("src", "http://localhost:8000/appcache/resources/foreign-iframe.html");
document.body.appendChild(ifr);
}
applicationCache.addEventListener('checking', function() { log("checking") }, false);
applicationCache.addEventListener('error', function() { log("error") }, false);
applicationCache.addEventListener('downloading', function() { log("downloading") }, false);
applicationCache.addEventListener('progress', function() { log("progress") }, false);
applicationCache.addEventListener('updateready', function() { log("updateready") }, false);
applicationCache.addEventListener('obsolete', function() { log("obsolete") }, false);
applicationCache.addEventListener('noupdate', function() { log("noupdate"); test() }, false);
applicationCache.addEventListener('cached', function() { log("cached"); test() }, false);
window.addEventListener("message", function() { log("SUCCESS"); if (window.testRunner) testRunner.notifyDone() }, false);
</script>
</body>
</html>