Index: LayoutTests/fast/forms/ValidityState-tooLong-textarea.html |
diff --git a/LayoutTests/fast/forms/ValidityState-tooLong-textarea.html b/LayoutTests/fast/forms/ValidityState-tooLong-textarea.html |
index c8cbb9c53a2ee03299fd70f46f4532726df2a1c7..280f410cb604ce292991d7e262da33e8b1af6d40 100644 |
--- a/LayoutTests/fast/forms/ValidityState-tooLong-textarea.html |
+++ b/LayoutTests/fast/forms/ValidityState-tooLong-textarea.html |
@@ -50,11 +50,19 @@ textarea.value = 'abcde'; |
shouldBeFalse('textarea.validity.tooLong'); |
debug(''); |
-debug('Disabled'); |
-textarea.disabled = true; |
-shouldBeFalse('textarea.validity.tooLong'); |
-textarea.disabled = false; |
+debug('Disabling makes the control valid'); |
+textarea.focus(); |
+textarea.setSelectionRange(5, 5); // Move the cursor at the end. |
+document.execCommand('delete'); |
+shouldBeTrue('textarea.validity.tooLong'); |
+shouldBeFalse('textarea.disabled = true; textarea.validity.tooLong'); |
+shouldBeTrue('textarea.disabled = false; textarea.validity.tooLong'); |
+// TODO: The grapheme test below doesn't do its job because initial value is |
+// always valid. After making a modificaton to trigger validity check, one can |
+// see that the test would fail, which possibly reveals a code issue. |
+// Once this is figured out, implement a similar test in |
+// ValidityState-tooShort-textarea.html |
debug(''); |
debug('Grapheme length is not greater than maxLength though character length is greater'); |
// fancyX should be treated as 1 grapheme. |