Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: LayoutTests/fast/forms/text-input-js-pop-up-for-tab-pressed.html

Issue 297343003: Fix for the input element contains extra '\t' TAB symbol after pressing TAB key when JS pop-up is a… Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added layout tests. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/forms/text-input-js-pop-up-for-tab-pressed-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
+
« no previous file with comments | « no previous file | LayoutTests/fast/forms/text-input-js-pop-up-for-tab-pressed-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698