gecko-dev/dom/tests/mochitest/general/497633.html
Yoshi Huang b823849d69 Bug 1363632 - rewrite test_497898.html. r=smaug
test_497898.html uses encoded URI in data:text/html, so I am going to
replace it with srcdoc attribute and also decode the URI into plain
html.
2017-05-16 16:57:20 +08:00

36 lines
701 B
HTML

<html>
<head>
</head>
<body>
<script>
var t = 0;
function doe() {
setTimeout(function() {
if (t == 1) {
window.close();
window.opener.done();
}
else {
window.frames[0].location.reload();
t++;
}
}, 300);
}
</script>
<iframe srcdoc="<html xmlns='http://www.w3.org/1999/xhtml'>
<iframe/>
<frameset onblur='window.frameElement.parentNode.removeChild(window.frameElement)' id='frame'/>
<script>
function doe(i){
document.getElementById('frame').focus();
document.getElementsByTagName('*')[1].focus();
}
top.opener.SimpleTest.waitForFocus(function () setTimeout(doe, 100), top);
</script>
</html>" onload="doe()" id="content"></iframe>
</body>
</html>