layout/reftests/xul/accesskey.xul

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <?xml version="1.0"?>
     2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     4 <!-- This test checks that access keys are rendered properly, both when set with the
     5      accesskey attribute in the markup and updated via script later.
     6   -->
     7 <window class="reftest-wait" onload="changeKeys()"
     8         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    10 <script>
    11 <![CDATA[
    13 var keys = ['L', 'l', 'b', 'x', 'l'];
    15 function changeKeys()
    16 {
    17   var box = document.getElementById('d');
    18   for (var b = 0; b < 5; b++)
    19     box.childNodes[b * 2].accessKey = keys[b];
    21   document.documentElement.className='';
    22 }
    24 ]]>
    25 </script>
    27 <hbox align="start">
    28   <label control="b1">Label1</label><textbox id="b1" accesskey="L" size="2"/>
    29   <label control="b2">Label2</label><textbox id="b2" accesskey="l" size="2"/>
    30   <label control="b3">Label3</label><textbox id="b3" accesskey="b" size="2"/>
    31   <label control="b4">Label4</label><textbox id="b4" accesskey="x" size="2"/>
    32   <label control="b5" maxwidth="50">Quite a long label. Hopefully it will wrap</label><textbox id="b5" accesskey="l" size="2"/>
    33 </hbox>
    35 <hbox id="d" align="start">
    36   <label control="d1">Label1</label><textbox id="d1" accesskey="z" size="2"/>
    37   <label control="d2">Label2</label><textbox id="d2" size="2"/>
    38   <label control="d3">Label3</label><textbox id="d3" accesskey="t" size="2"/>
    39   <label control="d4">Label4</label><textbox id="d4" accesskey="b" size="2"/>
    40   <label control="d5" maxwidth="50">Quite a long label. Hopefully it will wrap</label><textbox id="d5" accesskey="l" size="2"/>
    41 </hbox>
    43 </window>

mercurial