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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/number/number-validity-typemismatch.html

Issue 1378613005: input[type=number] should not accept numbers ending with '.'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | third_party/WebKit/LayoutTests/fast/forms/number/number-validity-typemismatch-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/forms/number/number-validity-typemismatch.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/number/number-validity-typemismatch.html b/third_party/WebKit/LayoutTests/fast/forms/number/number-validity-typemismatch.html
index ef354536dba880a6795b33e82110594df327cc47..37a83d81acdf9466d00e5063258cfde7de395cdf 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/number/number-validity-typemismatch.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/number/number-validity-typemismatch.html
@@ -10,6 +10,8 @@ description('This test aims to check for typeMismatch flag with type=number inpu
var i = document.createElement('input');
i.type = 'number';
+// TODO(tkent): check() doesn't make sense because the number type never be
+// typeMismatch.
function check(value, disabled)
{
i.value = value;
@@ -55,6 +57,8 @@ checkSanitization('0xff', '');
checkSanitization('+1', '');
checkSanitization(' 10', '');
checkSanitization('10 ', '');
+checkSanitization('0.', '');
+checkSanitization('1.', '');
checkSanitization('1,2', '');
checkSanitization('1E', '');
checkSanitization('NaN', '');
@@ -70,9 +74,7 @@ check('');
// Huge exponent.
checkSanitization('1.2E65535', '');
-// The spec doesn't allow, but our implementation does.
-check('1.');
-check('1.2e10');
+checkSanitization('1.2e10', '1.2e10');
// Disabled
check('invalid', true);
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/number/number-validity-typemismatch-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698