<!doctype HTML>
<iframe id="frame"></iframe>
<script>
if (window.testRunner)
window.testRunner.waitUntilDone();
function done() {
if (window.testRunner)
window.testRunner.notifyDone();
}
function test() {
const content = '<head><base href="resources/"></head><body>' +
'<img src="base-test-resources/success.png" onload="parent.done()" onerror="parent.done()">' +
'</body>';
const doc = document.getElementById("frame").contentDocument;
doc.firstChild.innerHTML = content;
}
window.onload = test;
</script>