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

Unified Diff: LayoutTests/fast/forms/number/number-validity-badinput.html

Issue 460343004: Fix update of validity cache value, so that it reflects the correct state of any FormControlElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated Created 6 years, 3 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 | LayoutTests/fast/forms/number/number-validity-badinput-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/number/number-validity-badinput.html
diff --git a/LayoutTests/fast/forms/number/number-validity-badinput.html b/LayoutTests/fast/forms/number/number-validity-badinput.html
index ebd68e4a24b06834393514ab4032e3849cda0508..a743ee9b1bb6c292f37c5acb502a1c230379afcb 100644
--- a/LayoutTests/fast/forms/number/number-validity-badinput.html
+++ b/LayoutTests/fast/forms/number/number-validity-badinput.html
@@ -46,7 +46,7 @@ shouldBe('colorOf(number)', 'invalidStyleColor');
shouldBeTrue('number.validity.badInput');
shouldBeEqualToString('number.value', '');
-debug("The element losts focus. The element state should not be changed.");
+debug("The element looses focus. The element state should not be changed.");
document.getElementById('another').focus();
shouldBe('colorOf(number)', 'invalidStyleColor');
shouldBeTrue('number.validity.badInput');
@@ -56,7 +56,7 @@ document.execCommand('SelectAll');
shouldBeEqualToString('document.getSelection().toString()', '-1a');
shouldBeEqualToString('number.value', '');
-debug("The element losts a renderer. The element state should not be changed.");
+debug("The element looses renderer. The element state should not be changed.");
shouldBeTrue('number.style.display = "none"; number.validity.badInput');
number.style.display = 'inline-block';
@@ -64,6 +64,17 @@ number.focus();
debug('A bad input should be cleared by value="".');
shouldBeEqualToString('number.value = ""; document.execCommand("SelectAll"); document.getSelection().toString()', '');
+debug('badInput and checkValidty() should be updated by value= "some valid number"');
+number.focus();
+debug('Type some text (invalid input)');
+document.execCommand('InsertText', false, 'g');
+shouldBeTrue('number.validity.badInput');
+shouldBeFalse('number.checkValidity()');
+debug('Now set a valid value');
+number.value = '1';
+shouldBeFalse('number.validity.badInput');
+shouldBeTrue('number.checkValidity()');
+
document.getElementById('parent').innerHTML = '';
</script>
</body>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/number/number-validity-badinput-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698