layout/xul/grid/crashtests/313173-1-inner.xul

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 <?xml version="1.0"?>
michael@0 2
michael@0 3 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
michael@0 4
michael@0 5 <window title="Testcase bug - Crash with evil xul testcase, using -moz-grid/table-caption"
michael@0 6 xmlns:html="http://www.w3.org/1999/xhtml"
michael@0 7 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
michael@0 8
michael@0 9 <grid flex="1">
michael@0 10 <columns>
michael@0 11 <column flex="1"/>
michael@0 12 </columns>
michael@0 13
michael@0 14 <rows>
michael@0 15 <row>
michael@0 16 </row>
michael@0 17 </rows>
michael@0 18 </grid>
michael@0 19
michael@0 20 <html:script>
michael@0 21 function doe(){
michael@0 22 document.getElementsByTagName('columns')[0].style.display='table-caption';
michael@0 23 setTimeout(doe2,20);
michael@0 24 }
michael@0 25 function doe2(){
michael@0 26 document.getElementsByTagName('columns')[0].style.display='-moz-grid';
michael@0 27 }
michael@0 28
michael@0 29 function clickit() {
michael@0 30 var button = document.getElementById('button');
michael@0 31 var evt = document.createEvent("MouseEvents");
michael@0 32 evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
michael@0 33 button.dispatchEvent(evt);
michael@0 34 setTimeout('clickit();', 20);
michael@0 35 }
michael@0 36 window.addEventListener('load', clickit, false);
michael@0 37
michael@0 38 </html:script>
michael@0 39 <html:button id="button" onclick="doe()" label="click">Clicking this should not crash Mozilla</html:button>
michael@0 40 </window>
michael@0 41

mercurial