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

Unified Diff: LayoutTests/fast/forms/time/time-stepup-stepdown.html

Issue 1340883002: Avoid stack overflow in InputType::applyStep(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
Index: LayoutTests/fast/forms/time/time-stepup-stepdown.html
diff --git a/LayoutTests/fast/forms/time/time-stepup-stepdown.html b/LayoutTests/fast/forms/time/time-stepup-stepdown.html
index fe221268310c4498faebbc302649a94bfedd7a0e..68871056c987e613dad6cb139743f320be50ba2f 100644
--- a/LayoutTests/fast/forms/time/time-stepup-stepdown.html
+++ b/LayoutTests/fast/forms/time/time-stepup-stepdown.html
@@ -58,14 +58,25 @@ debug('Step=any');
shouldThrow('stepUp("20:13", "any", null)');
shouldThrow('stepDown("20:13", "any", null)');
debug('Overflow/underflow');
-shouldBeEqualToString('stepUp("20:13", "3.40282346e+38", null)', '23:59:59.999');
-shouldBeEqualToString('stepDown("20:13", "3.40282346e+38", null)', '00:00:00');
+shouldBeEqualToString('stepUp("20:13", "3.40282346e+38", null)', '20:13');
+shouldBeEqualToString('stepDown("20:13", "3.40282346e+38", null)', '20:13');
shouldBeEqualToString('stepUp("20:13", "1", "20:13")', '20:13:00');
shouldBeEqualToString('stepDown("20:13", "1", "20:13")', '20:13:00');
shouldBeEqualToString('stepUp("23:59", null, null)', '23:59');
shouldBeEqualToString('stepDown("00:00", null, null)', '00:00');
debug('');
+debug('Step-mismatched initial values');
+// There are no step-match values in 00:00 - 23:59:59.999. stepUp()
+// should do nothing.
+shouldBeEqualToString('stepUp("20:13", "86400.000", null, 65536)', '20:13');
+shouldBeEqualToString('stepUp("20:13", "86400.001", null, 65536)', '20:13');
+shouldBeEqualToString('stepUp("20:13", "600", null, 1)', '20:20');
+shouldBeEqualToString('stepUp("20:13", "600", null, 2)', '20:30');
+shouldBeEqualToString('stepDown("20:13", "600", null, 1)', '20:10');
+shouldBeEqualToString('stepDown("20:13", "600", null, 2)', '20:00');
+
+debug('');
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698