layout/xul/tree/crashtests/399227-1.xul

Wed, 31 Dec 2014 06:55:46 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:46 +0100
changeset 1
ca08bd8f51b2
permissions
-rw-r--r--

Added tag TORBROWSER_REPLICA for changeset 6474c204b198

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 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="reftest-wait" onload="setTimeout(boom, 30)">
michael@0 6
michael@0 7
michael@0 8 <script>
michael@0 9 function boom()
michael@0 10 {
michael@0 11 var tree = document.getElementById("thetree");
michael@0 12 var selection = tree.view.selection;
michael@0 13
michael@0 14 selection.select(0);
michael@0 15 tree.parentNode.removeChild(tree);
michael@0 16
michael@0 17 // This is expected to throw an error (it used to crash).
michael@0 18 try {
michael@0 19 selection.rangedSelect(1, 1, false);
michael@0 20 }
michael@0 21 catch (ex) {}
michael@0 22
michael@0 23 document.documentElement.removeAttribute("class");
michael@0 24 }
michael@0 25 </script>
michael@0 26
michael@0 27 <tree flex="1" id="thetree">
michael@0 28 <treecols>
michael@0 29 <treecol label="Name"/>
michael@0 30 </treecols>
michael@0 31 <treechildren id="TC">
michael@0 32 <treeitem id="TI1">
michael@0 33 <treerow>
michael@0 34 <treecell label="First treecell"/>
michael@0 35 </treerow>
michael@0 36 </treeitem>
michael@0 37 <treeitem id="TI2">
michael@0 38 <treerow>
michael@0 39 <treecell label="Second treecell"/>
michael@0 40 </treerow>
michael@0 41 </treeitem>
michael@0 42 </treechildren>
michael@0 43 </tree>
michael@0 44 </window>

mercurial