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

Unified Diff: LayoutTests/fast/forms/number/number-skip-spaces-in-user-input.html

Issue 235273003: parsing input type=number should skip spaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments Created 6 years, 8 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/number/number-skip-spaces-in-user-input-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/number/number-skip-spaces-in-user-input.html
diff --git a/LayoutTests/fast/forms/number/number-skip-spaces-in-user-input.html b/LayoutTests/fast/forms/number/number-skip-spaces-in-user-input.html
new file mode 100644
index 0000000000000000000000000000000000000000..232f0b6d2fd4cbffe441072e847ce34a139e7c91
--- /dev/null
+++ b/LayoutTests/fast/forms/number/number-skip-spaces-in-user-input.html
@@ -0,0 +1,22 @@
+<html>
+<body>
+<script src="../../../resources/js-test.js"></script>
+<input type="number" id="input"></input>
+<script>
+description('should skip spaces from user input number');
+var input = document.getElementById('input');
+input.onblur = function()
+{
+ shouldBe('input.valueAsNumber', '123456');
+ shouldBeEqualToString('input.value', '123456');
+}
+window.onload = function()
+{
+ input.focus();
+ document.execCommand('InsertText', false, ' 123 456 ')
+ input.blur();
+}
+</script>
+</body>
+</html>
+
« no previous file with comments | « no previous file | LayoutTests/fast/forms/number/number-skip-spaces-in-user-input-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698