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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/xul/tree/crashtests/399227-2.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,50 @@
     1.4 +<?xml version="1.0"?>
     1.5 +
     1.6 +<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
     1.7 +
     1.8 +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="reftest-wait" onload="setTimeout(boom, 30);">
     1.9 +
    1.10 +
    1.11 +  <script>
    1.12 +  function boom()
    1.13 +  {
    1.14 +    var tree = document.getElementById("thetree");
    1.15 +    var selection = tree.view.selection;
    1.16 +    var treecolumn0 = tree.columns[0];
    1.17 +    var treecolumn1 = tree.columns[1];
    1.18 +
    1.19 +    selection.select(0);
    1.20 +    selection.currentColumn = treecolumn0;
    1.21 +    tree.parentNode.removeChild(tree);
    1.22 +
    1.23 +    // This is expected to throw an error (it used to crash).
    1.24 +    try {
    1.25 +      selection.currentColumn = treecolumn1;
    1.26 +    }
    1.27 +    catch (ex) {}
    1.28 +
    1.29 +    document.documentElement.removeAttribute("class");
    1.30 +  }
    1.31 +  </script>
    1.32 +
    1.33 +<tree flex="1" id="thetree" seltype="cell">
    1.34 +    <treecols>
    1.35 +      <treecol label="Name"/>
    1.36 +      <treecol label="Test"/>
    1.37 +    </treecols>
    1.38 +    <treechildren id="TC">
    1.39 +      <treeitem id="TI1">
    1.40 +        <treerow>
    1.41 +          <treecell label="First treecell"/>
    1.42 +          <treecell label="Second treecell"/>
    1.43 +        </treerow>
    1.44 +      </treeitem>
    1.45 +      <treeitem id="TI2">
    1.46 +        <treerow>
    1.47 +          <treecell label="Third treecell"/>
    1.48 +          <treecell label="Fourth treecell"/>
    1.49 +        </treerow>
    1.50 +      </treeitem>
    1.51 +    </treechildren>
    1.52 +  </tree>
    1.53 +</window>

mercurial