<!DOCTYPE html>
<html>
<body>

<!-- Ensures that TreeScope::m_imageMapsByName is created -->
<map name></map>

<script>
if (window.testRunner)
    testRunner.dumpAsText();

var map = document.createElement('map');
map.name = 'map';

var script = document.createElement('script');
script.textContent = 'document.currentScript.parentNode.remove()';

var container = document.createElement('div');
container.appendChild(script);
container.appendChild(map);

document.body.appendChild(container);
document.body.innerHTML = 'PASS';
</script>
</body>
</html>
