|
1 <?xml version="1.0"?> |
|
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
|
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> |
|
4 <!-- |
|
5 https://bugzilla.mozilla.org/show_bug.cgi?id=382990 |
|
6 --> |
|
7 <window title="Mozilla Bug 382990" |
|
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
|
9 onload="startThisTest()"> |
|
10 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> |
|
11 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> |
|
12 |
|
13 <!-- test results are displayed in the html:body --> |
|
14 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
15 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=382990" |
|
16 target="_blank">Mozilla Bug 382990</a> |
|
17 </body> |
|
18 |
|
19 <tree id="testTree" height="200px"> |
|
20 <treecols> |
|
21 <treecol flex="1" label="Name" id="name"/> |
|
22 </treecols> |
|
23 <treechildren> |
|
24 <treeitem><treerow><treecell label="a"/></treerow></treeitem> |
|
25 <treeitem><treerow><treecell label="z"/></treerow></treeitem> |
|
26 </treechildren> |
|
27 </tree> |
|
28 |
|
29 <!-- test code goes here --> |
|
30 <script type="application/javascript"><![CDATA[ |
|
31 /** Test for Bug 382990 **/ |
|
32 |
|
33 SimpleTest.waitForExplicitFinish(); |
|
34 function startThisTest() |
|
35 { |
|
36 var treeElem = document.getElementById("testTree"); |
|
37 treeElem.view.selection.select(0); |
|
38 treeElem.focus(); |
|
39 synthesizeKey("z", {ctrlKey: true}); |
|
40 ok(!treeElem.view.selection.isSelected(1), "Tree selection should not change for key events with ctrl pressed."); |
|
41 SimpleTest.finish(); |
|
42 } |
|
43 ]]></script> |
|
44 </window> |