editor/composer/src/crashtests/351236-1.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 <html><head>
michael@0 2 <title>Testcase bug 351236 - Crash [@ nsGetInterface::operator()] with designMode iframes, removing styles, removing iframes, reloading, etc</title>
michael@0 3 <script>
michael@0 4 function designmodes(i){
michael@0 5 try {
michael@0 6 window.frames[0].document.designMode='on';
michael@0 7 window.frames[0].focus();
michael@0 8 window.frames[0].getSelection().collapse(window.frames[0].document.body.childNodes[0],window.frames[0].document.body.childNodes[0].length-2)
michael@0 9 window.frames[0].document.execCommand('inserthtml', false, 'tesxt ');
michael@0 10 } catch(e) {}
michael@0 11
michael@0 12 setTimeout(designmodes,50);
michael@0 13 }
michael@0 14
michael@0 15 function removestyles(){
michael@0 16 document.getElementsByTagName('iframe')[0].removeAttribute('style');
michael@0 17 document.getElementsByTagName('q')[0].removeAttribute('style');
michael@0 18 }
michael@0 19
michael@0 20 function doe() {
michael@0 21 setTimeout(designmodes,200);
michael@0 22 setTimeout(removestyles,500);
michael@0 23 setTimeout(function() {document.removeChild(document.documentElement);}, 1000);
michael@0 24 setTimeout(function() {window.location.reload();}, 1500);
michael@0 25 }
michael@0 26 window.onload=doe;
michael@0 27 </script>
michael@0 28
michael@0 29 </head>
michael@0 30 <body>
michael@0 31 This page should not crash Mozilla within 2 seconds<br>
michael@0 32 <q style="display: table-row;">
michael@0 33 <iframe style="display: table-row;"></iframe>
michael@0 34 <iframe></iframe>
michael@0 35 </q>
michael@0 36 </body>
michael@0 37 </html>

mercurial