OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script> | |
5 function myfunction(e) { | |
eseidel
2014/07/08 15:43:08
Do we have a more descriptive name than myFunction
| |
6 if(e.which == 9 ) | |
eseidel
2014/07/08 15:43:08
Why the inconsistent spacing?
| |
7 alert(document.getElementById('text1').value); | |
eseidel
2014/07/08 15:43:08
Why alert here if you have a shouldBe below?
| |
8 testRunner.notifyDone(); | |
eseidel
2014/07/08 15:43:08
This isn't a waitUntilDone test, you don't need no
| |
9 } | |
10 </script> | |
11 <script src="../../resources/js-test.js"></script> | |
12 </head> | |
13 <body> | |
14 <form id=parent> | |
15 <input type="text" id="text1" onkeydown="myfunction(event)", value="abcd" > | |
16 <input type="text" id="text2" > | |
eseidel
2014/07/08 15:43:08
Why all the funny spacing after the last attribute
| |
17 <input type="text" id="text3" > | |
18 <input type="text" id="text4" onkeydown="myfunction(event)" > | |
19 </form> | |
20 <script> | |
21 text1.focus(); | |
22 if (window.testRunner) { | |
23 debug("This test case checks when we press a tab key in a text field ins erts tab in the text field when there is JS pop-up associated with the texbox fo r tab press event,"); | |
eseidel
2014/07/08 15:43:08
The helper you are using has a description() metho
| |
24 debug("which actually should not insert tab in the text field."); | |
25 debug("\nTo test this manully write a sample page which has textbox and js pop-up(alert or confirmation) for tab keypress event, then focus on the textb ox and press tab, see there is a tab inserted or not in the textbox."); | |
26 debug("\n"); | |
27 eventSender.keyDown('\t'); | |
28 var expectedValue="abcd"; | |
29 shouldBe("document.getElementById('text1').value", "expectedValue"); | |
30 debug(document.getElementById('text2').value); | |
31 } | |
32 </script> | |
33 | |
34 </body> | |
35 </html> | |
36 | |
OLD | NEW |