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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/text/input-maxlength.html

Issue 1615003002: Fix behavior of HTMLInputElement.maxLength/minLength getter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/text/input-maxlength-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p>This page tests that the <tt>maxlength</tt> attribute of the <tt>&lt;input&gt ;</tt> element works correctly. <a href="http://bugs.webkit.org/show_bug.cgi?id= 14388">http://bugs.webkit.org/show_bug.cgi?id=14388</a></p> 7 <p>This page tests that the <tt>maxlength</tt> attribute of the <tt>&lt;input&gt ;</tt> element works correctly. <a href="http://bugs.webkit.org/show_bug.cgi?id= 14388">http://bugs.webkit.org/show_bug.cgi?id=14388</a></p>
8 <div id="console"></div> 8 <div id="console"></div>
9 9
10 <input id="input"> 10 <input id="input">
(...skipping 28 matching lines...) Expand all
39 for (var j = 0; j < maxLengthsToTest.length; ++j) { 39 for (var j = 0; j < maxLengthsToTest.length; ++j) {
40 var maxLength = maxLengthsToTest[j]; 40 var maxLength = maxLengthsToTest[j];
41 input.setAttribute("maxlength", maxLength); 41 input.setAttribute("maxlength", maxLength);
42 var expected = Math.min(stringLength, implicitMaxLength); 42 var expected = Math.min(stringLength, implicitMaxLength);
43 attempt(stringLength, expected); 43 attempt(stringLength, expected);
44 } 44 }
45 } 45 }
46 46
47 debug('Some tests for .maxLength property.'); 47 debug('Some tests for .maxLength property.');
48 input = document.createElement("input"); 48 input = document.createElement("input");
49 shouldBe("input.maxLength", "implicitMaxLength"); 49 shouldBe("input.maxLength", "-1");
tkent 2016/01/22 05:03:30 Let's remove line 49 and 50 because they are teste
50 shouldThrow("input.maxLength = -1", '"IndexSizeError: Failed to set the \'ma xLength\' property on \'HTMLInputElement\': The value provided (-1) is negative. "'); 50 shouldThrow("input.maxLength = -1", '"IndexSizeError: Failed to set the \'ma xLength\' property on \'HTMLInputElement\': The value provided (-1) is negative. "');
51 input.maxLength = 100; 51 input.maxLength = 100;
52 shouldBe("input.getAttribute('maxlength')", "'100'"); 52 shouldBe("input.getAttribute('maxlength')", "'100'");
53 </script> 53 </script>
54 </body> 54 </body>
55 </html> 55 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/text/input-maxlength-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698