}
private void setMaxLength(int newMaxLength) {
- if (newMaxLength > 0) {
+ if (newMaxLength >= 0) {
maxLength = newMaxLength;
if (getElement().getTagName().toLowerCase().equals("textarea")) {
// NOP no maxlength property for textarea
<head profile="http://selenium-ide.openqa.org/profiles/test-case">\r
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
<link rel="selenium.base" href="" />\r
-<title>New Test</title>\r
+<title>TextFieldMaxLength</title>\r
</head>\r
<body>\r
<table cellpadding="1" cellspacing="1" border="1">\r
<thead>\r
-<tr><td rowspan="1" colspan="3">New Test</td></tr>\r
+<tr><td rowspan="1" colspan="3">TextFieldMaxLength</td></tr>\r
</thead><tbody>\r
<tr>\r
<td>open</td>\r
<td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td>\r
<td>6. ValueChangeEvent, new value: '123456789012345'</td>\r
</tr>\r
+<!--MaxLength 0-->\r
+<tr>\r
+ <td>mouseClick</td>\r
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_Smenu#item0</td>\r
+ <td>20,8</td>\r
+</tr>\r
+<tr>\r
+ <td>mouseClick</td>\r
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[0]/VMenuBar[0]#item5</td>\r
+ <td>33,5</td>\r
+</tr>\r
+<tr>\r
+ <td>mouseClick</td>\r
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[1]/VMenuBar[0]#item2</td>\r
+ <td>51,3</td>\r
+</tr>\r
+<tr>\r
+ <td>mouseClick</td>\r
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[2]/VMenuBar[0]#item0</td>\r
+ <td>9,9</td>\r
+</tr>\r
+<!--Enter some text-->\r
+<tr>\r
+ <td>enterCharacter</td>\r
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>\r
+ <td>123456789012345</td>\r
+</tr>\r
+<tr>\r
+ <td>assertValue</td>\r
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>\r
+ <td></td>\r
+</tr>\r
+<tr>\r
+ <td>assertText</td>\r
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td>\r
+ <td>8. ValueChangeEvent, new value: ''</td>\r
+</tr>\r
</tbody></table>\r
</body>\r
</html>\r