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