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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/input-minvalue.html

Issue 1615003002: Fix behavior of HTMLInputElement.maxLength/minLength getter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set to -1 for invalid attribute or negative Created 4 years, 10 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/text/input-maxlength.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/forms/input-minvalue.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/maxlength.html b/third_party/WebKit/LayoutTests/fast/forms/input-minvalue.html
similarity index 53%
copy from third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/maxlength.html
copy to third_party/WebKit/LayoutTests/fast/forms/input-minvalue.html
index 75fc982c7228d1c1033ecf17bfa0a5146e318448..a79bd7ffd835dd0d991606a068b9a0c4b109a032 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/maxlength.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/input-minvalue.html
@@ -1,11 +1,10 @@
<!DOCTYPE html>
<html>
<head>
- <title>input max length</title>
- <link rel="author" title="Sam Gibson" href="mailto:sam@ifdown.net">
+ <title>input min length</title>
<link rel=help href="https://html.spec.whatwg.org/multipage/forms.html#the-maxlength-and-minlength-attributes">
- <script src="../../../../../../resources/testharness.js"></script>
- <script src="../../../../../../resources/testharnessreport.js"></script>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
</head>
<body>
@@ -13,8 +12,8 @@
<div style="display: none">
<input id="none" />
- <input id="negative" type="-5" />
- <input id="non-numeric" type="not-a-number" />
+ <input id="negative" minLength="-5" />
+ <input id="non-numeric" minLength="not-a-number" />
<input id="assign-negative" />
<input id="assign-non-numeric" />
</div>
@@ -24,31 +23,31 @@
<script type="text/javascript">
test(
function() {
- assert_equals(document.getElementById("none").maxLength, -1);
- }, "Unset maxlength is -1");
+ assert_equals(document.getElementById("none").minLength, -1);
+ }, "Unset minlength is -1");
test(
function() {
- assert_equals(document.getElementById("negative").maxLength, -1);
- }, "Negative maxlength is always -1");
+ assert_equals(document.getElementById("negative").minLength, -1);
+ }, "Negative minlength is always -1");
test(
function() {
- assert_equals(document.getElementById("non-numeric").maxLength, -1);
- }, "Non-numeric maxlength is -1");
+ assert_equals(document.getElementById("non-numeric").minLength, -1);
+ }, "Non-numeric minlength is -1");
test(
function() {
assert_throws("INDEX_SIZE_ERR", function() {
- document.getElementById("assign-negative").maxLength = -5;
+ document.getElementById("assign-negative").minLength = -5;
});
}, "Assigning negative integer throws IndexSizeError");
test(
function() {
- document.getElementById("assign-non-numeric").maxLength = "not-a-number";
- assert_equals(document.getElementById("assign-non-numeric").maxLength, 0);
- }, "Assigning non-numeric to maxlength sets maxlength to 0");
+ document.getElementById("assign-non-numeric").minLength = "not-a-number";
+ assert_equals(document.getElementById("assign-non-numeric").minLength, 0);
+ }, "Assigning non-numeric to minlength sets minlength to 0");
</script>
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/text/input-maxlength.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698