<!DOCTYPE html>
<script>
function runTest()
{
    if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
    }

    iframe.contentWindow.applicationCache.addEventListener("checking", () => {
        document.body.appendChild(iframe);
        document.body.innerHTML = 'This test passes if WebKit does not crash or hit any assertions';
        if (window.testRunner)
            testRunner.notifyDone();
    }, {capture: true, passive: true});
}
</script>
<body onload="runTest()">
<iframe id="iframe" src="data:text/html,foo"></iframe>
<div id="container">
</body>