blob: b14ffedaabd8142324edd405f46300716d669f2e [file] [log] [blame]
<html manifest="resources/subframes-1.manifest">
<!--
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 that a subframe without manifest doesn't pick an application cache from parent frame
(as long as no relevant cache contains its resource).</p>
<p>Techically, the check is that iframe subresources that are not in top frame cache are loaded
anyway, so it can also pass if the UA fails to reject loads for cache misses.</p>
<p>Should say SUCCESS:</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", "resources/subframe-1.html");
document.body.appendChild(ifr);
}
applicationCache.addEventListener('noupdate', function() { test() }, false);
applicationCache.addEventListener('cached', function() { test() }, false);
applicationCache.onupdateready = function() { log("FAIL: received unexpected updateready event") }
applicationCache.onerror = function() { log("FAIL: received unexpected error event") }
window.addEventListener("message", function() { log("SUCCESS"); if (window.testRunner) testRunner.notifyDone() }, false);
</script>
</body>
</html>