Backed out changeset 39e6a7e77cfb (bug 1927808) for causing multiple failures. CLOSED...
[gecko.git] / dom / tests / mochitest / chrome / file_first_focusable_in_scope.xhtml
blobab90230eaa59aab1700a14c3ec06136ac14e91b1
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
4 <window onload="start()"
5 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
6 xmlns:html="http://www.w3.org/1999/xhtml">
8 <linkset>
9 <html:link rel="localization" href="browser/places.ftl"/>
10 </linkset>
11 <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
13 <hbox id="sidebar-search-container" align="center">
14 <search-textbox id="search-box" flex="1"
15 data-l10n-id="places-bookmarks-search"
16 data-l10n-attrs="placeholder"
17 aria-controls="bookmarks-view"
18 oncommand="searchBookmarks(this.value);"/>
19 </hbox>
21 <tree seltype="single" flex="1">
22 <treecols>
23 <treecol flex="1"/>
24 <treecol flex="1"/>
25 </treecols>
26 <treechildren>
27 <treeitem><treerow><treecell label="One"/><treecell label="Two"/></treerow></treeitem>
28 </treechildren>
29 </tree>
31 <script type="application/javascript">
32 <![CDATA[
34 function is(l, r, n) { window.arguments[0].SimpleTest.is(l,r,n); }
35 function ok(v, n) { window.arguments[0].SimpleTest.ok(v,n); }
37 function done()
39 window.close();
40 window.arguments[0].SimpleTest.finish();
43 function start()
45 is(document.activeElement, document.documentElement, "initial focus is the document element");
46 synthesizeKey("KEY_F6");
47 is(document.activeElement, document.getElementById("search-box"), "F6 moves to the first focusable element");
48 done();
51 ]]></script>
53 </window>