2 <?xml-stylesheet href=
"chrome://global/skin" type=
"text/css"?>
3 <?xml-stylesheet href=
"chrome://mochikit/content/tests/SimpleTest/test.css" type=
"text/css"?>
5 https://bugzilla.mozilla.org/show_bug.cgi?id=586961
7 <window title=
"Mozilla Bug 586961"
8 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
10 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
11 <script src=
"chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
12 <body xmlns=
"http://www.w3.org/1999/xhtml">
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=586961">Mozilla Bug
586961</a>
16 <div id=
"content" style=
"display: none">
20 <box onclick=
"clicked(event)">
21 <label id=
"controllabel" control=
"controlbutton" accesskey=
"k" value=
"Click here" />
22 <button id=
"controlbutton" label=
"Button" />
25 <script class=
"testbody" type=
"application/javascript"><![CDATA[
27 /** Test for Bug
586961 **/
29 function clicked(event) {
30 is(event.target.id,
"controlbutton",
"Accesskey was directed to controlled element.");
35 var accessKeyDetails = (navigator.platform.includes(
"Mac")) ?
36 { altKey : true, ctrlKey : true } :
37 { altKey : true, shiftKey: true };
38 synthesizeKey(
"k", accessKeyDetails);
41 SimpleTest.waitForExplicitFinish();
42 SimpleTest.waitForFocus(test, window);