chromium/third_party/blink/web_tests/fast/forms/removed-image-as-property.html

<body onload="test()">
<p>Test that an image isn't accessible via form.property syntax after being removed from document.</p>
<div>Testing...</div>
<form className="a">
<img src="" id="i">
</form>
<script src="../../resources/gc.js"></script>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function test()
{
    var f = document.getElementsByTagName("form")[0];
    f.removeChild(document.getElementsByTagName("img")[0]);
    f.foobar;
    setTimeout(function() {
        gc();
        try {
            f.i.nodeName;
            document.getElementsByTagName("div")[0].innerHTML = "FAIL";
        } catch (ex) {
            document.getElementsByTagName("div")[0].innerHTML = "PASS";
        }
        if (window.testRunner)
            testRunner.notifyDone();
    }, 0);
}
</script>