1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/composer/src/crashtests/351236-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +<html><head> 1.5 +<title>Testcase bug 351236 - Crash [@ nsGetInterface::operator()] with designMode iframes, removing styles, removing iframes, reloading, etc</title> 1.6 +<script> 1.7 +function designmodes(i){ 1.8 +try { 1.9 +window.frames[0].document.designMode='on'; 1.10 +window.frames[0].focus(); 1.11 +window.frames[0].getSelection().collapse(window.frames[0].document.body.childNodes[0],window.frames[0].document.body.childNodes[0].length-2) 1.12 +window.frames[0].document.execCommand('inserthtml', false, 'tesxt '); 1.13 +} catch(e) {} 1.14 + 1.15 +setTimeout(designmodes,50); 1.16 +} 1.17 + 1.18 +function removestyles(){ 1.19 +document.getElementsByTagName('iframe')[0].removeAttribute('style'); 1.20 +document.getElementsByTagName('q')[0].removeAttribute('style'); 1.21 +} 1.22 + 1.23 +function doe() { 1.24 +setTimeout(designmodes,200); 1.25 +setTimeout(removestyles,500); 1.26 +setTimeout(function() {document.removeChild(document.documentElement);}, 1000); 1.27 +setTimeout(function() {window.location.reload();}, 1500); 1.28 +} 1.29 +window.onload=doe; 1.30 +</script> 1.31 + 1.32 +</head> 1.33 +<body> 1.34 +This page should not crash Mozilla within 2 seconds<br> 1.35 +<q style="display: table-row;"> 1.36 +<iframe style="display: table-row;"></iframe> 1.37 +<iframe></iframe> 1.38 +</q> 1.39 +</body> 1.40 +</html> 1.41 \ No newline at end of file