| 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>
|
|
|