tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TextEvent.inputMode.keyboard.html (1906B)


      1 <!DOCTYPE html>
      2 <html>
      3    <head>
      4        <title id='desc'> TextEvent: inputMode with DOM_INPUT_METHOD_KEYBOARD </title>
      5        <script type="text/javascript">
      6            var PassTest = function()
      7            {
      8                document.getElementById("testresult").firstChild.data = "PASS";
      9            }
     10 
     11            var FailTest = function()
     12            {
     13                document.getElementById("testresult").firstChild.data = "FAIL";
     14            }
     15 
     16            var EVENT = "textInput";
     17            var TARGET;
     18 
     19            function TestEvent(evt)
     20            {
     21                TARGET.removeEventListener(EVENT, TestEvent, true);
     22 
     23                if ((0x01 == evt.inputMode) && ("a" == evt.data))
     24                {
     25                    PassTest();
     26                }
     27                else
     28                {
     29                    FailTest();
     30                }
     31            }
     32 
     33            window.onload = function()
     34            {
     35                try
     36                {
     37                    TARGET = document.getElementById("target");
     38                    TARGET.addEventListener(EVENT, TestEvent, true);
     39                }
     40                catch(ex)
     41                {
     42                    FailTest();
     43                }
     44            }
     45        </script>
     46    </head>
     47    <body>
     48        <h3>DOM Events</h3>
     49        <h4>
     50            Test Description: TextEvent.inputMode is DOM_INPUT_METHOD_KEYBOARD (0x01)
     51            when the text string was input through a keyboard.
     52        </h4>
     53 
     54        <span id="parent">
     55            <input id="target" type="text" />
     56        </span>
     57        <p id="manualsteps">
     58            Steps:
     59            <ol>
     60                <li> Type 'a' in the above texbox using keyboard
     61            </ol>
     62        </p>
     63        <p>Test passes if the word "PASS" appears below after following the above steps.</p>
     64        <div>Test result: </div>
     65        <div id='testresult'>FAIL</div>
     66    </body>
     67 </html>