Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
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 | var treecolumn0 = tree.columns[0]; |
michael@0 | 14 | var treecolumn1 = tree.columns[1]; |
michael@0 | 15 | |
michael@0 | 16 | selection.select(0); |
michael@0 | 17 | selection.currentColumn = treecolumn0; |
michael@0 | 18 | tree.parentNode.removeChild(tree); |
michael@0 | 19 | |
michael@0 | 20 | // This is expected to throw an error (it used to crash). |
michael@0 | 21 | try { |
michael@0 | 22 | selection.currentColumn = treecolumn1; |
michael@0 | 23 | } |
michael@0 | 24 | catch (ex) {} |
michael@0 | 25 | |
michael@0 | 26 | document.documentElement.removeAttribute("class"); |
michael@0 | 27 | } |
michael@0 | 28 | </script> |
michael@0 | 29 | |
michael@0 | 30 | <tree flex="1" id="thetree" seltype="cell"> |
michael@0 | 31 | <treecols> |
michael@0 | 32 | <treecol label="Name"/> |
michael@0 | 33 | <treecol label="Test"/> |
michael@0 | 34 | </treecols> |
michael@0 | 35 | <treechildren id="TC"> |
michael@0 | 36 | <treeitem id="TI1"> |
michael@0 | 37 | <treerow> |
michael@0 | 38 | <treecell label="First treecell"/> |
michael@0 | 39 | <treecell label="Second treecell"/> |
michael@0 | 40 | </treerow> |
michael@0 | 41 | </treeitem> |
michael@0 | 42 | <treeitem id="TI2"> |
michael@0 | 43 | <treerow> |
michael@0 | 44 | <treecell label="Third treecell"/> |
michael@0 | 45 | <treecell label="Fourth treecell"/> |
michael@0 | 46 | </treerow> |
michael@0 | 47 | </treeitem> |
michael@0 | 48 | </treechildren> |
michael@0 | 49 | </tree> |
michael@0 | 50 | </window> |