| <html manifest="origin-delete-iframe.manifest"> |
| <script> |
| // iframe-1 is expected to succeed. |
| applicationCache.oncached = function() { parent.postMessage("PASS - cached iframe-1", "*"); }; |
| applicationCache.onerror = function() { parent.postMessage("FAIL - error caching iframe-1, expected this to succeed", "*"); }; |
| applicationCache.onnoupdate = function() { parent.postMessage("FAIL - no update iframe-1, all caches should have been deleted before this test", "*"); }; |
| |
| |
| function frameMessageReceived(event) { |
| if (event.data === "appcache_status") { |
| parent.postMessage("appcache_status=" + applicationCache.status, "*"); |
| } else { |
| parent.postMessage("FAIL - unrecognized message", "*"); |
| } |
| } |
| |
| window.addEventListener("message", frameMessageReceived, false); |
| |
| </script> |
| </html> |