Index: LayoutTests/fast/forms/text-input-js-pop-up-for-tab-pressed.html |
diff --git a/LayoutTests/fast/forms/text-input-js-pop-up-for-tab-pressed.html b/LayoutTests/fast/forms/text-input-js-pop-up-for-tab-pressed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d12fb4805c3f241a0efb871aea4237ff5429dde5 |
--- /dev/null |
+++ b/LayoutTests/fast/forms/text-input-js-pop-up-for-tab-pressed.html |
@@ -0,0 +1,36 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script> |
+function myfunction(e) { |
eseidel
2014/07/08 15:43:08
Do we have a more descriptive name than myFunction
|
+if(e.which == 9 ) |
eseidel
2014/07/08 15:43:08
Why the inconsistent spacing?
|
+ alert(document.getElementById('text1').value); |
eseidel
2014/07/08 15:43:08
Why alert here if you have a shouldBe below?
|
+ testRunner.notifyDone(); |
eseidel
2014/07/08 15:43:08
This isn't a waitUntilDone test, you don't need no
|
+ } |
+</script> |
+<script src="../../resources/js-test.js"></script> |
+</head> |
+<body> |
+<form id=parent> |
+ <input type="text" id="text1" onkeydown="myfunction(event)", value="abcd" > |
+ <input type="text" id="text2" > |
eseidel
2014/07/08 15:43:08
Why all the funny spacing after the last attribute
|
+ <input type="text" id="text3" > |
+ <input type="text" id="text4" onkeydown="myfunction(event)" > |
+</form> |
+<script> |
+text1.focus(); |
+if (window.testRunner) { |
+ debug("This test case checks when we press a tab key in a text field inserts tab in the text field when there is JS pop-up associated with the texbox for tab press event,"); |
eseidel
2014/07/08 15:43:08
The helper you are using has a description() metho
|
+ debug("which actually should not insert tab in the text field."); |
+ 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 textbox and press tab, see there is a tab inserted or not in the textbox."); |
+ debug("\n"); |
+ eventSender.keyDown('\t'); |
+ var expectedValue="abcd"; |
+ shouldBe("document.getElementById('text1').value", "expectedValue"); |
+ debug(document.getElementById('text2').value); |
+} |
+</script> |
+ |
+</body> |
+</html> |
+ |