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

Unified Diff: LayoutTests/fast/forms/month/input-valueasnumber-month.html

Issue 149413004: HTMLInputElement.valueAsNumber compliance (NaN handling.) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/forms/month/input-valueasnumber-month.html
diff --git a/LayoutTests/fast/forms/month/input-valueasnumber-month.html b/LayoutTests/fast/forms/month/input-valueasnumber-month.html
index 98c6e16b3da17aeb4c687177b3cec4740acd90dc..2ae1e973630deba0629fe8573e75efdd32575bdf 100644
--- a/LayoutTests/fast/forms/month/input-valueasnumber-month.html
+++ b/LayoutTests/fast/forms/month/input-valueasnumber-month.html
@@ -47,12 +47,15 @@ shouldBe('setValueAsNumberAndGetValue(275760, 10)', '""');
debug('Tests to set invalid values to valueAsNumber:');
shouldBe('input.value = ""; input.valueAsNumber = null; input.value', '"1970-01"');
-shouldThrow('input.valueAsNumber = "foo"', '"NotSupportedError: Failed to set the \'valueAsNumber\' property on \'HTMLInputElement\': The value provided is not a number."');
-shouldThrow('input.valueAsNumber = NaN', '"NotSupportedError: Failed to set the \'valueAsNumber\' property on \'HTMLInputElement\': The value provided is not a number."');
-shouldThrow('input.valueAsNumber = Number.NaN', '"NotSupportedError: Failed to set the \'valueAsNumber\' property on \'HTMLInputElement\': The value provided is not a number."');
-shouldThrow('input.valueAsNumber = Infinity', '"NotSupportedError: Failed to set the \'valueAsNumber\' property on \'HTMLInputElement\': The value provided is infinite."');
-shouldThrow('input.valueAsNumber = Number.POSITIVE_INFINITY', '"NotSupportedError: Failed to set the \'valueAsNumber\' property on \'HTMLInputElement\': The value provided is infinite."');
-shouldThrow('input.valueAsNumber = Number.NEGATIVE_INFINITY', '"NotSupportedError: Failed to set the \'valueAsNumber\' property on \'HTMLInputElement\': The value provided is infinite."');
+shouldBeNaN('input.valueAsNumber = "foo"; input.valueAsNumber');
+shouldBeEqualToString('input.valueAsNumber = "foo"; input.value', '');
+shouldBeNaN('input.valueAsNumber = NaN; input.valueAsNumber');
+shouldBeEqualToString('input.valueAsNumber = NaN; input.value', '');
+shouldBeNaN('input.valueAsNumber = Number.NaN; input.valueAsNumber');
+shouldBeEqualToString('input.valueAsNumber = Number.NaN; input.value', '');
+shouldThrow('input.valueAsNumber = Infinity', '"TypeError: Failed to set the \'valueAsNumber\' property on \'HTMLInputElement\': The value provided is infinite."');
+shouldThrow('input.valueAsNumber = Number.POSITIVE_INFINITY', '"TypeError: Failed to set the \'valueAsNumber\' property on \'HTMLInputElement\': The value provided is infinite."');
+shouldThrow('input.valueAsNumber = Number.NEGATIVE_INFINITY', '"TypeError: Failed to set the \'valueAsNumber\' property on \'HTMLInputElement\': The value provided is infinite."');
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698