7 testRunner
.waitUntilDone();
9 // 1) leave field 1 alone. It should show the placeholder text.
10 // 2) focus field 2 and type. It should show bullets for the password.
11 var password
= document
.getElementById("pass2");
13 document
.execCommand("InsertText", false, "test");
14 // 3) focus field 3 and type. Clear the value and blur the field. It should show the placeholder text.
15 password
= document
.getElementById("pass3");
17 document
.execCommand("InsertText", false, "test");
21 if (window
.testRunner
)
22 testRunner
.notifyDone();
26 <body onload=
"test()">
27 This tests that the text security mode switches correctly when the placeholder appears and disappears.
<br>
28 Leave field
1 alone. It should show the placeholder text:
<input type=
"password" id=
"pass1" placeholder=
"placeholder"><br>
29 Focus field
2 and type. It should show bullets for the password.:
<input type=
"password" id=
"pass2" placeholder=
"placeholder"><br>
30 Focus field
3 and type. Clear the value and blur the field. It should show the placeholder text:
<input type=
"password" id=
"pass3" placeholder=
"placeholder"><br>