Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>nsIAccessibleText getText related function tests for text and password inputs</title>
5 <link rel="stylesheet" type="text/css"
6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
8 <script type="application/javascript"
9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <script type="application/javascript"
11 src="../common.js"></script>
12 <script type="application/javascript"
13 src="../text.js"></script>
15 <script type="application/javascript">
16 function doTest()
17 {
18 //////////////////////////////////////////////////////////////////////////
19 // regular text and password inputs
20 //////////////////////////////////////////////////////////////////////////
22 ////////////////////////////////////////////////////////////////////////
23 // characterCount and getText for regular text field
25 var IDs = [ "username" ];
26 testCharacterCount(IDs, 4);
27 testText(IDs, 0, 4, "test");
29 ////////////////////////////////////////////////////////////////////////
30 // characterCount and getText for password field
32 IDs = [ "password" ];
33 testCharacterCount(IDs, 4);
34 testPasswordText(IDs, 0, 4, "test");
36 SimpleTest.finish();
37 }
39 SimpleTest.waitForExplicitFinish();
40 addA11yLoadEvent(doTest);
41 </script>
42 </head>
43 <body>
45 <a target="_blank"
46 title="mochitest for getText for password fields"
47 href="https://bugzilla.mozilla.org/show_bug.cgi?id=415943">Mozilla Bug 415943</a>
48 <p id="display"></p>
49 <div id="content" style="display: none"></div>
50 <pre id="test">
51 </pre>
53 <form action="post.php" method="post">
54 <label for="username">User name:</label>
55 <input id="username" value="test"><br />
56 <label for="password">Password:</label>
57 <input type="password" id="password" value="test"/>
58 </form>
59 </body>
60 </html>