accessible/tests/mochitest/text/test_passwords.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial