| <html manifest="resources/subframes-1.manifest"> | |
| <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> |