[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 02:06:48 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit d83ad7d393ee98f1a2ab5c3ade3379e4bde2c38d
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 2 20:31:57 2010 +0000

    2010-03-02  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Shinichiro Hamaji.
    
            Merge ValidityState-stepMismatch-{number,range,unsupported}.html and
            input-step-{number,range,unsupported}.html to other tests
            https://bugs.webkit.org/show_bug.cgi?id=35435
    
            - Merge ValidityState-stepMismatch-{number,range,unsupported}.html to
            ValidityState-stepMismatch.html
            - Merge input-step--{number,range,unsupported}.html to input-step.html
    
            * fast/forms/ValidityState-stepMismatch-expected.txt:
            * fast/forms/ValidityState-stepMismatch-number-expected.txt: Removed.
            * fast/forms/ValidityState-stepMismatch-number.html: Removed.
            * fast/forms/ValidityState-stepMismatch-range-expected.txt: Removed.
            * fast/forms/ValidityState-stepMismatch-range.html: Removed.
            * fast/forms/ValidityState-stepMismatch-unsupported-expected.txt: Removed.
            * fast/forms/ValidityState-stepMismatch-unsupported.html: Removed.
            * fast/forms/input-step-number-expected.txt: Removed.
            * fast/forms/input-step-number.html: Removed.
            * fast/forms/input-step-range-expected.txt: Removed.
            * fast/forms/input-step-range.html: Removed.
            * fast/forms/input-step-unsupported-expected.txt: Removed.
            * fast/forms/input-step-unsupported.html: Removed.
            * fast/forms/input-stepup-stepdown-expected.txt:
            * fast/forms/script-tests/ValidityState-stepMismatch-number.js: Removed.
            * fast/forms/script-tests/ValidityState-stepMismatch-range.js: Removed.
            * fast/forms/script-tests/ValidityState-stepMismatch-unsupported.js: Removed.
            * fast/forms/script-tests/ValidityState-stepMismatch.js:
            * fast/forms/script-tests/input-step-number.js: Removed.
            * fast/forms/script-tests/input-step-range.js: Removed.
            * fast/forms/script-tests/input-step-unsupported.js: Removed.
            * fast/forms/script-tests/input-stepup-stepdown.js:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55423 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d406dcd..8a81a54 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,38 @@
+2010-03-02  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Shinichiro Hamaji.
+
+        Merge ValidityState-stepMismatch-{number,range,unsupported}.html and
+        input-step-{number,range,unsupported}.html to other tests
+        https://bugs.webkit.org/show_bug.cgi?id=35435
+
+        - Merge ValidityState-stepMismatch-{number,range,unsupported}.html to
+        ValidityState-stepMismatch.html
+        - Merge input-step--{number,range,unsupported}.html to input-step.html
+
+        * fast/forms/ValidityState-stepMismatch-expected.txt:
+        * fast/forms/ValidityState-stepMismatch-number-expected.txt: Removed.
+        * fast/forms/ValidityState-stepMismatch-number.html: Removed.
+        * fast/forms/ValidityState-stepMismatch-range-expected.txt: Removed.
+        * fast/forms/ValidityState-stepMismatch-range.html: Removed.
+        * fast/forms/ValidityState-stepMismatch-unsupported-expected.txt: Removed.
+        * fast/forms/ValidityState-stepMismatch-unsupported.html: Removed.
+        * fast/forms/input-step-number-expected.txt: Removed.
+        * fast/forms/input-step-number.html: Removed.
+        * fast/forms/input-step-range-expected.txt: Removed.
+        * fast/forms/input-step-range.html: Removed.
+        * fast/forms/input-step-unsupported-expected.txt: Removed.
+        * fast/forms/input-step-unsupported.html: Removed.
+        * fast/forms/input-stepup-stepdown-expected.txt:
+        * fast/forms/script-tests/ValidityState-stepMismatch-number.js: Removed.
+        * fast/forms/script-tests/ValidityState-stepMismatch-range.js: Removed.
+        * fast/forms/script-tests/ValidityState-stepMismatch-unsupported.js: Removed.
+        * fast/forms/script-tests/ValidityState-stepMismatch.js:
+        * fast/forms/script-tests/input-step-number.js: Removed.
+        * fast/forms/script-tests/input-step-range.js: Removed.
+        * fast/forms/script-tests/input-step-unsupported.js: Removed.
+        * fast/forms/script-tests/input-stepup-stepdown.js:
+
 2010-03-02  Brady Eidson  <beidson at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt b/LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt
index 93ac014..522c50e 100644
--- a/LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt
+++ b/LayoutTests/fast/forms/ValidityState-stepMismatch-expected.txt
@@ -113,6 +113,58 @@ PASS stepMismatchFor("2010-03", "foo", "2010-02") is false
 Special step value
 PASS stepMismatchFor("2010-03", "any", "2010-02") is false
 
+Number type
+Empty values
+PASS stepMismatchFor("", null, null) is false
+PASS stepMismatchFor("", "1.0", "0.1") is false
+Integers
+PASS stepMismatchFor("1", "2", "0") is true
+PASS stepMismatchFor("-3", "2", "-4") is true
+PASS input.max = "5"; stepMismatchFor("5", "3", "0") is true
+PASS input.value is "5"
+Invalid step values
+PASS stepMismatchFor("-3", "-2", "-4") is false
+PASS stepMismatchFor("-3", null, "-4") is false
+PASS stepMismatchFor("-3", undefined, "-4") is false
+Huge numbers and small step; uncomparable
+PASS stepMismatchFor("1.7976931348623157e+308", "3", "") is false
+PASS stepMismatchFor("1.7976931348623156e+308", "3", "") is false
+PASS stepMismatchFor("1.7976931348623155e+308", "3", "") is false
+Huge numbers and huge step
+PASS stepMismatchFor("1.60e+308", "0.20e+308", "") is false
+PASS stepMismatchFor("1.60e+308", "0.22e+308", "") is true
+Fractional numbers
+PASS stepMismatchFor("0.9", "0.1", "") is false
+PASS stepMismatchFor("0.9", "0.1000001", "") is true
+PASS stepMismatchFor("0.9", "0.1000000000000001", "") is false
+PASS stepMismatchFor("1.0", "0.3333333333333333", "") is false
+
+Range type
+Empty values
+PASS stepMismatchFor("", null, null) is false
+PASS stepMismatchFor("", "1.0", "0.1") is false
+Integers
+PASS stepMismatchFor("1", "2", "0") is false
+PASS stepMismatchFor("-3", "2", "-4") is false
+PASS input.max = "5"; stepMismatchFor("5", "3", "0") is false
+PASS input.value is "3"
+Invalid step values
+PASS stepMismatchFor("-3", "-2", "-4") is false
+PASS stepMismatchFor("-3", null, "-4") is false
+PASS stepMismatchFor("-3", undefined, "-4") is false
+Huge numbers and small step; uncomparable
+PASS stepMismatchFor("1.7976931348623157e+308", "3", "") is false
+PASS stepMismatchFor("1.7976931348623156e+308", "3", "") is false
+PASS stepMismatchFor("1.7976931348623155e+308", "3", "") is false
+Huge numbers and huge step
+PASS stepMismatchFor("1.60e+308", "0.20e+308", "") is false
+PASS stepMismatchFor("1.60e+308", "0.22e+308", "") is false
+Fractional numbers
+PASS stepMismatchFor("0.9", "0.1", "") is false
+PASS stepMismatchFor("0.9", "0.1000001", "") is false
+PASS stepMismatchFor("0.9", "0.1000000000000001", "") is false
+PASS stepMismatchFor("1.0", "0.3333333333333333", "") is false
+
 Time type
 Empty values
 PASS stepMismatchFor("", null, null) is false
@@ -169,6 +221,24 @@ PASS stepMismatchFor("2010-W03", "-1", "2010-W02") is false
 PASS stepMismatchFor("2010-W03", "foo", "2010-W02") is false
 Special step value
 PASS stepMismatchFor("2010-W03", "any", "2010-W02") is false
+
+Unsupported types
+PASS input.type = "text"; input.step = "3"; input.min = ""; input.value = "2"; input.validity.stepMismatch is false
+PASS input.type = "button"; input.validity.stepMismatch is false
+PASS input.type = "checkbox"; input.validity.stepMismatch is false
+PASS input.type = "color"; input.validity.stepMismatch is false
+PASS input.type = "email"; input.validity.stepMismatch is false
+PASS input.type = "hidden"; input.validity.stepMismatch is false
+PASS input.type = "image"; input.validity.stepMismatch is false
+PASS input.type = "khtml_isindex"; input.validity.stepMismatch is false
+PASS input.type = "passwd"; input.validity.stepMismatch is false
+PASS input.type = "radio"; input.validity.stepMismatch is false
+PASS input.type = "reset"; input.validity.stepMismatch is false
+PASS input.type = "search"; input.validity.stepMismatch is false
+PASS input.type = "submit"; input.validity.stepMismatch is false
+PASS input.type = "tel"; input.validity.stepMismatch is false
+PASS input.type = "url"; input.validity.stepMismatch is false
+PASS input.type = "file"; input.validity.stepMismatch is false
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/fast/forms/ValidityState-stepMismatch-number-expected.txt b/LayoutTests/fast/forms/ValidityState-stepMismatch-number-expected.txt
deleted file mode 100644
index c6903c2..0000000
--- a/LayoutTests/fast/forms/ValidityState-stepMismatch-number-expected.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-Check stepMismatch results for type=number.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is true
-PASS input.validity.stepMismatch is true
-PASS input.validity.stepMismatch is true
-PASS input.value is "5"
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is true
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is true
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/ValidityState-stepMismatch-number.html b/LayoutTests/fast/forms/ValidityState-stepMismatch-number.html
deleted file mode 100644
index 73967bf..0000000
--- a/LayoutTests/fast/forms/ValidityState-stepMismatch-number.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/ValidityState-stepMismatch-number.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-stepMismatch-range-expected.txt b/LayoutTests/fast/forms/ValidityState-stepMismatch-range-expected.txt
deleted file mode 100644
index 641e5a7..0000000
--- a/LayoutTests/fast/forms/ValidityState-stepMismatch-range-expected.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-Check stepMismatch results for type=range.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.value is "3"
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/ValidityState-stepMismatch-range.html b/LayoutTests/fast/forms/ValidityState-stepMismatch-range.html
deleted file mode 100644
index 4f8f785..0000000
--- a/LayoutTests/fast/forms/ValidityState-stepMismatch-range.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/ValidityState-stepMismatch-range.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-stepMismatch-unsupported-expected.txt b/LayoutTests/fast/forms/ValidityState-stepMismatch-unsupported-expected.txt
deleted file mode 100644
index 63d50f4..0000000
--- a/LayoutTests/fast/forms/ValidityState-stepMismatch-unsupported-expected.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Check stepMismatch results for types which does not support for step.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS input.validity.stepMismatch is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/ValidityState-stepMismatch-unsupported.html b/LayoutTests/fast/forms/ValidityState-stepMismatch-unsupported.html
deleted file mode 100644
index 3f9c4e1..0000000
--- a/LayoutTests/fast/forms/ValidityState-stepMismatch-unsupported.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/ValidityState-stepMismatch-unsupported.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/input-step-number-expected.txt b/LayoutTests/fast/forms/input-step-number-expected.txt
deleted file mode 100644
index ebee207..0000000
--- a/LayoutTests/fast/forms/input-step-number-expected.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-Tests stepDown()/stepUp() for type=number.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Tests for an invalid current value:
-PASS input.stepDown() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepDown("foo") with value=0:
-PASS input.value is "0"
-stepUp("foo") with value=0:
-PASS input.value is "0"
-stepDown(null) with value=0:
-PASS input.value is "0"
-stepUp(null) with value=0:
-PASS input.value is "0"
-stepDown(undefined) with value=0:
-PASS input.value is "0"
-stepUp(undefined) with value=0:
-PASS input.value is "0"
-stepUp() with value=0:
-PASS input.value is "1"
-stepUp(2) with value=1:
-PASS input.value is "3"
-stepUp(-1) with value=3:
-PASS input.value is "2"
-stepDown(-1) with value=2:
-PASS input.value is "1"
-stepDown(2) with value=1:
-PASS input.value is "-1"
-stepDown(-1) with value=-1:
-PASS input.value is "0"
-stepUp(1, 2) with value=0:
-PASS input.value is "1"
-stepUp(1, 3) with value=1:
-PASS input.value is "0"
-stepUp() with value=0 step=foo:
-PASS input.value is "1"
-stepUp() with value=1 step=0:
-PASS input.value is "2"
-stepUp() with value=2 step=-1:
-PASS input.value is "3"
-stepDown() and stepUp() with value=0 step=any:
-PASS input.stepDown() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepDown() with value=1 min=0 step=1:
-PASS input.value is "0"
-stepDown() with value=0 min=0 step=1:
-PASS input.stepDown() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepDown(2) with value=1 min=0 step=1:
-PASS input.stepDown(2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.value is "1"
-stepDown(2) with value=1 step=DBL_MAX:
-PASS input.stepDown(2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepUp() with value=-1 max=0 step=1:
-PASS input.value is "0"
-stepUp() with value=0 max=0 step=1:
-PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepUp(2) with value=-1 max=0 step=1:
-PASS input.stepUp(2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.value is "-1"
-stepUp(2) with value=1 step=DBL_MAX:
-PASS input.stepUp(2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepUp() with value=0 min=-1 step=2:
-PASS input.value is "3"
-PASS input.value is "1"
-stepUp(9) with value=9 min=0 step=10:
-PASS input.value is "100"
-stepDown() with value=19 min=0 step=10:
-PASS input.value is "10"
-stepUp() with value=89 min=0 max=99 step=10:
-PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepUp(999999) with value=1e+308 step=1:
-PASS input.value is "1e+308"
-PASS input.value is "1e+308"
-stepUp(3) with value=0 step=0.33333333333333333:
-PASS input.value is "1"
-stepUp(10) with value=1 step=0.1:
-PASS input.value is "2"
-stepUp() x10 with value=2 step=0.1:
-PASS input.value is "3"
-stepUp(255) with value=0 min=0 max=1 step=0.003921568627450980:
-PASS input.value is "1"
-stepDown() x255 with value=1 min=0 max=1 step=0.003921568627450980:
-PASS input.value is "0"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/input-step-number.html b/LayoutTests/fast/forms/input-step-number.html
deleted file mode 100644
index eb80ca6..0000000
--- a/LayoutTests/fast/forms/input-step-number.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/input-step-number.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/input-step-range-expected.txt b/LayoutTests/fast/forms/input-step-range-expected.txt
deleted file mode 100644
index abff94c..0000000
--- a/LayoutTests/fast/forms/input-step-range-expected.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-Tests stepDown()/stepUp() for type=range.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Tests for an invalid current value:
-PASS input.stepDown() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepDown("foo") with value=0:
-PASS input.value is "0"
-stepUp("foo") with value=0:
-PASS input.value is "0"
-stepDown(null) with value=0:
-PASS input.value is "0"
-stepUp(null) with value=0:
-PASS input.value is "0"
-stepDown(undefined) with value=0:
-PASS input.value is "0"
-stepUp(undefined) with value=0:
-PASS input.value is "0"
-stepUp() with value=0 min=-100:
-PASS input.value is "1"
-stepUp(2) with value=1:
-PASS input.value is "3"
-stepUp(-1) with value=3:
-PASS input.value is "2"
-stepDown(-1) with value=2:
-PASS input.value is "1"
-stepDown(2) with value=1:
-PASS input.value is "-1"
-stepDown(-1) with value=-1:
-PASS input.value is "0"
-stepUp(1, 2) with value=0:
-PASS input.value is "1"
-stepUp(1, 3) with value=1:
-PASS input.value is "0"
-stepUp() with value=0 step=foo:
-PASS input.value is "1"
-stepUp() with value=1 step=0:
-PASS input.value is "2"
-stepUp() with value=2 step=-1:
-PASS input.value is "3"
-stepDown() and stepUp() with value=0 step=any:
-PASS input.stepDown() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepDown() with value=1 min=0 step=1:
-PASS input.value is "0"
-stepDown() with value=0 min=0 step=1:
-PASS input.stepDown() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepDown(2) with value=1 min=0 step=1:
-PASS input.stepDown(2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.value is "1"
-stepDown(2) with value=1 step=DBL_MAX:
-PASS input.stepDown(2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepUp() with value=-1 min=-100 max=0 step=1:
-PASS input.value is "0"
-stepUp() with value=0 min=-100 max=0 step=1:
-PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepUp(2) with value=-1 min=-100 max=0 step=1:
-PASS input.stepUp(2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.value is "-1"
-stepUp(2) with value=1 step=DBL_MAX:
-PASS input.stepUp(2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepUp() with value=0 min=-1 step=2:
-PASS input.value is "3"
-PASS input.value is "1"
-stepUp(9) with value=9 min=0 step=10:
-PASS input.value is "100"
-stepDown() with value=19 min=0 step=10:
-PASS input.value is "10"
-stepUp() with value=89 min=0 max=99 step=10:
-PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-stepUp(999999) with value=1e+308 min=0 max=1.1e+308 step=1:
-PASS input.value is "1e+308"
-PASS input.value is "1e+308"
-stepUp(3) with value=0 step=0.33333333333333333:
-PASS input.value is "1"
-stepUp(10) with value=1 step=0.1:
-PASS input.value is "2"
-stepUp() x10 with value=2 step=0.1:
-PASS input.value is "3"
-stepUp(255) with value=0 min=0 max=1 step=0.003921568627450980:
-PASS input.value is "1"
-stepDown() x255 with value=1 min=0 max=1 step=0.003921568627450980:
-PASS input.value is "0"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/input-step-range.html b/LayoutTests/fast/forms/input-step-range.html
deleted file mode 100644
index 776b374..0000000
--- a/LayoutTests/fast/forms/input-step-range.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/input-step-range.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/input-step-unsupported-expected.txt b/LayoutTests/fast/forms/input-step-unsupported-expected.txt
deleted file mode 100644
index df4a6ea..0000000
--- a/LayoutTests/fast/forms/input-step-unsupported-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-Tests stepDown()/stepUp() for unsupported types
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS input.stepDown() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.stepDown(0) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS input.stepUp(0) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/input-step-unsupported.html b/LayoutTests/fast/forms/input-step-unsupported.html
deleted file mode 100644
index 663caad..0000000
--- a/LayoutTests/fast/forms/input-step-unsupported.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/input-step-unsupported.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/input-stepup-stepdown-expected.txt b/LayoutTests/fast/forms/input-stepup-stepdown-expected.txt
index 735749d..e05ed8a 100644
--- a/LayoutTests/fast/forms/input-stepup-stepdown-expected.txt
+++ b/LayoutTests/fast/forms/input-stepup-stepdown-expected.txt
@@ -111,6 +111,116 @@ PASS stepDown("2010-02", "1.7976931348623156e+308", null) threw exception Error:
 PASS stepUp("2010-02", "1", "2010-02") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 PASS stepDown("2010-02", "1", "2010-02") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 
+Number type
+Invalid value
+PASS stepUp("", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+Non-number arguments
+PASS stepUp("0", null, null, "0") is "0"
+PASS stepDown("0", null, null, "0") is "0"
+PASS stepUp("0", null, null, "foo") is "0"
+PASS stepDown("0", null, null, "foo") is "0"
+PASS stepUp("0", null, null, null) is "0"
+PASS stepDown("0", null, null, null) is "0"
+Normal cases
+PASS stepUp("0", null, null) is "1"
+PASS stepUp("1", null, null, 2) is "3"
+PASS stepUp("3", null, null, -1) is "2"
+PASS stepDown("2", null, null) is "1"
+PASS stepDown("1", null, null, 2) is "-1"
+PASS stepDown("-1", null, null, -1) is "0"
+Extra arguments
+PASS input.value = "0"; input.min = null; input.step = null; input.stepUp(1, 2); input.value is "1"
+PASS input.value = "1"; input.stepDown(1, 3); input.value is "0"
+Invalid step value
+PASS stepUp("0", "foo", null) is "1"
+PASS stepUp("1", "0", null) is "2"
+PASS stepUp("2", "-1", null) is "3"
+Step=any
+PASS stepUp("0", "any", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("0", "any", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+Overflow/underflow
+PASS stepDown("1", "1", "0") is "0"
+PASS stepDown("0", "1", "0") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("1", "1", "0", 2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.value is "1"
+PASS stepDown("1", "1.7976931348623156e+308", "", 2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepUp("-1", "1", "0") is "0"
+PASS stepUp("0", "1", "0") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepUp("-1", "1", "0", 2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.value is "-1"
+PASS stepUp("1", "1.7976931348623156e+308", "", 2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+stepDown()/stepUp() for stepMismatch values
+PASS stepUp("1", "2", "") is "4"
+PASS input.stepDown(); input.value is "2"
+PASS input.min = "0"; stepUp("9", "10", "", 9) is "100"
+PASS stepDown("19", "10", "0") is "10"
+PASS stepUp("89", "10", "99") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+Huge value and small step
+PASS input.min = ""; stepUp("1e+308", "1", "", 999999) is "1e+308"
+PASS input.max = ""; stepDown("1e+308", "1", "", 999999) is "1e+308"
+Fractional numbers
+PASS input.min = ""; stepUp("0", "0.33333333333333333", "", 3) is "1"
+PASS stepUp("1", "0.1", "", 10) is "2"
+PASS input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.value is "3"
+PASS input.min = "0"; stepUp("0", "0.003921568627450980", "1", 255) is "1"
+PASS for (var i = 0; i < 255; i++) { input.stepDown(); }; input.value is "0"
+
+Range type
+Invalid value
+PASS stepUp("", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+Non-number arguments
+PASS stepUp("0", null, null, "0") is "0"
+PASS stepDown("0", null, null, "0") is "0"
+PASS stepUp("0", null, null, "foo") is "0"
+PASS stepDown("0", null, null, "foo") is "0"
+PASS stepUp("0", null, null, null) is "0"
+PASS stepDown("0", null, null, null) is "0"
+Normal cases
+PASS stepUp("0", null, null) is "1"
+PASS stepUp("1", null, null, 2) is "3"
+PASS stepUp("3", null, null, -1) is "2"
+PASS stepDown("2", null, "-100") is "1"
+PASS stepDown("1", null, "-100", 2) is "-1"
+PASS stepDown("-1", null, "-100", -1) is "0"
+Extra arguments
+PASS input.value = "0"; input.min = null; input.step = null; input.stepUp(1, 2); input.value is "1"
+PASS input.value = "1"; input.stepDown(1, 3); input.value is "0"
+Invalid step value
+PASS stepUp("0", "foo", null) is "1"
+PASS stepUp("1", "0", null) is "2"
+PASS stepUp("2", "-1", null) is "3"
+Step=any
+PASS stepUp("0", "any", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("0", "any", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+Overflow/underflow
+PASS stepDown("1", "1", "0") is "0"
+PASS stepDown("0", "1", "0") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS stepDown("1", "1", "0", 2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.value is "1"
+PASS stepDown("1", "1.7976931348623156e+308", "", 2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.min = "-100"; stepUp("-1", "1", "0") is "0"
+PASS stepUp("0", "1", "0") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.min = "-100"; stepUp("-1", "1", "0", 2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.value is "-1"
+PASS stepUp("1", "1.7976931348623156e+308", "", 2) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+stepDown()/stepUp() for stepMismatch values
+PASS stepUp("1", "2", "") is "4"
+PASS input.stepDown(); input.value is "2"
+PASS input.min = "0"; stepUp("9", "10", "", 9) is "100"
+PASS stepDown("19", "10", "0") is "10"
+PASS stepUp("89", "10", "99") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+Huge value and small step
+PASS input.min = "0"; stepUp("1e+308", "1", "1e+308", 999999) is "1e+308"
+PASS input.max = "1e+308"; input.min = "0"; input.step = "1"; input.value = "1e+308"; input.stepDown(999999); input.value is "1e+308"
+Fractional numbers
+PASS input.min = ""; stepUp("0", "0.33333333333333333", "", 3) is "1"
+PASS stepUp("1", "0.1", "", 10) is "2"
+PASS input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.value is "3"
+PASS input.min = "0"; stepUp("0", "0.003921568627450980", "1", 255) is "1"
+PASS for (var i = 0; i < 255; i++) { input.stepDown(); }; input.value is "0"
+
 Time type
 Invalid value
 PASS stepUp("", null, null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
@@ -166,6 +276,12 @@ PASS stepUp("2010-W02", "1.7976931348623156e+308", null) threw exception Error:
 PASS stepDown("2010-W02", "1.7976931348623156e+308", null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 PASS stepUp("2010-W02", "1", "2010-W02") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 PASS stepDown("2010-W02", "1", "2010-W02") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+
+Unsupported type
+PASS input.step = "3"; input.min = ""; input.max = ""; input.value = "2"; input.stepDown() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.stepDown(0) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.stepUp() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.stepUp(0) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch-number.js b/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch-number.js
deleted file mode 100644
index 6f74448..0000000
--- a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch-number.js
+++ /dev/null
@@ -1,69 +0,0 @@
-description('Check stepMismatch results for type=number.');
-
-var input = document.createElement('input');
-input.type = 'number';
-
-// If the value is empty, it never mismatches.
-input.value = '';
-shouldBe('input.validity.stepMismatch', 'false');
-input.min = '0.1';
-input.step = '1.0';
-shouldBe('input.validity.stepMismatch', 'false');
-
-// Integers
-input.value = '1';
-input.min = '0';
-input.step = '2';
-shouldBe('input.validity.stepMismatch', 'true');
-input.value = '-3';
-input.min = '-4';
-input.step = '2';
-shouldBe('input.validity.stepMismatch', 'true');
-input.min = '0';
-input.max = '5';
-input.step = '3';
-input.value = '5';
-shouldBe('input.validity.stepMismatch', 'true');
-shouldBe('input.value', '"5"');
-// Invalid step attribute is ignored.
-input.value = '-3';
-input.min = '-4';
-input.max = '';
-input.step = '-2';
-shouldBe('input.validity.stepMismatch', 'false');
-input.step = null;
-shouldBe('input.validity.stepMismatch', 'false');
-input.step = undefined;
-shouldBe('input.validity.stepMismatch', 'false');
-// Huge numbers and small step; uncomparable
-input.value = '1.7976931348623157e+308';
-input.min = '';
-input.step = '3';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '1.7976931348623156e+308';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '1.7976931348623155e+308';
-shouldBe('input.validity.stepMismatch', 'false');
-// Huge numbers and huge step
-input.value = '1.60e+308';
-input.step = '0.20e+308';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '1.60e+308';
-input.step = '0.22e+308';
-shouldBe('input.validity.stepMismatch', 'true');
-
-// Fractional numbers
-input.value = '0.9';
-input.step = '0.1';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '0.9';
-input.step = '0.1000001';
-shouldBe('input.validity.stepMismatch', 'true');
-input.value = '0.9';
-input.step = '0.1000000000000001';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '1.0';
-input.step = '0.3333333333333333';
-shouldBe('input.validity.stepMismatch', 'false');
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch-range.js b/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch-range.js
deleted file mode 100644
index 3e59459..0000000
--- a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch-range.js
+++ /dev/null
@@ -1,74 +0,0 @@
-description('Check stepMismatch results for type=range.');
-
-var input = document.createElement('input');
-// Needs a renderer.
-document.body.appendChild(input);
-input.type = 'range';
-
-// The following test inputs are the same as ValidityState-stepMismatch-number.js,
-// but all expected results should be 'false'.
-
-// If the value is empty, it never mismatches.
-input.value = '';
-shouldBe('input.validity.stepMismatch', 'false');
-input.min = '0.1';
-input.step = '1.0';
-shouldBe('input.validity.stepMismatch', 'false');
-
-// Integers
-input.value = '1';
-input.min = '0';
-input.step = '2';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '-3';
-input.min = '-4';
-input.step = '2';
-shouldBe('input.validity.stepMismatch', 'false');
-input.min = '0';
-input.max = '5';
-input.step = '3';
-input.value = '5';
-shouldBe('input.validity.stepMismatch', 'false');
-shouldBe('input.value', '"3"');
-// Invalid step attribute is ignored.
-input.value = '-3';
-input.min = '-4';
-input.max = '';
-input.step = '-2';
-shouldBe('input.validity.stepMismatch', 'false');
-input.step = null;
-shouldBe('input.validity.stepMismatch', 'false');
-input.step = undefined;
-shouldBe('input.validity.stepMismatch', 'false');
-// Huge numbers and small step; uncomparable
-input.value = '1.7976931348623157e+308';
-input.min = '';
-input.step = '3';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '1.7976931348623156e+308';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '1.7976931348623155e+308';
-shouldBe('input.validity.stepMismatch', 'false');
-// Huge numbers and huge step
-input.value = '1.60e+308';
-input.step = '0.20e+308';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '1.60e+308';
-input.step = '0.22e+308';
-shouldBe('input.validity.stepMismatch', 'false');
-
-// Fractional numbers
-input.value = '0.9';
-input.step = '0.1';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '0.9';
-input.step = '0.1000001';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '0.9';
-input.step = '0.1000000000000001';
-shouldBe('input.validity.stepMismatch', 'false');
-input.value = '1.0';
-input.step = '0.3333333333333333';
-shouldBe('input.validity.stepMismatch', 'false');
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch-unsupported.js b/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch-unsupported.js
deleted file mode 100644
index 2439ec6..0000000
--- a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch-unsupported.js
+++ /dev/null
@@ -1,41 +0,0 @@
-description('Check stepMismatch results for types which does not support for step.');
-
-var input = document.createElement('input');
-
-input.type = 'text';
-input.step = '3';
-input.value = '2';
-shouldBe('input.validity.stepMismatch', 'false');
-
-input.type = 'button';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'checkbox';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'color';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'email';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'hidden';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'image';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'khtml_isindex';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'passwd';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'radio';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'reset';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'search';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'submit';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'tel';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'url';
-shouldBe('input.validity.stepMismatch', 'false');
-input.type = 'file';
-shouldBe('input.validity.stepMismatch', 'false');
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js b/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js
index 440751d..e86d3b5 100644
--- a/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js
+++ b/LayoutTests/fast/forms/script-tests/ValidityState-stepMismatch.js
@@ -1,12 +1,12 @@
 description('Check stepMismatch results for type=date, datetime, datetime-local, month, time, week.');
-// FIXME: Merge other ValidityState-stepMismatch-* into this.
 
 var input = document.createElement('input');
+document.body.appendChild(input);
 
 function stepMismatchFor(value, step, min) {
-    input.value = value;
-    input.step = step;
     input.min = min;
+    input.step = step;
+    input.value = value;
     return input.validity.stepMismatch;
 }
 
@@ -128,6 +128,66 @@ debug('Special step value');
 shouldBeFalse('stepMismatchFor("2010-03", "any", "2010-02")');
 
 debug('');
+debug('Number type');
+input.type = 'number';
+debug('Empty values');
+shouldBe('stepMismatchFor("", null, null)', 'false');
+shouldBe('stepMismatchFor("", "1.0", "0.1")', 'false');
+debug('Integers');
+shouldBe('stepMismatchFor("1", "2", "0")', 'true');
+shouldBe('stepMismatchFor("-3", "2", "-4")', 'true');
+shouldBe('input.max = "5"; stepMismatchFor("5", "3", "0")', 'true');
+shouldBe('input.value', '"5"');
+debug('Invalid step values');
+input.max = '';
+shouldBe('stepMismatchFor("-3", "-2", "-4")', 'false');
+shouldBe('stepMismatchFor("-3", null, "-4")', 'false');
+shouldBe('stepMismatchFor("-3", undefined, "-4")', 'false');
+debug('Huge numbers and small step; uncomparable');
+shouldBe('stepMismatchFor("1.7976931348623157e+308", "3", "")', 'false');
+shouldBe('stepMismatchFor("1.7976931348623156e+308", "3", "")', 'false');
+shouldBe('stepMismatchFor("1.7976931348623155e+308", "3", "")', 'false');
+debug('Huge numbers and huge step');
+shouldBe('stepMismatchFor("1.60e+308", "0.20e+308", "")', 'false');
+shouldBe('stepMismatchFor("1.60e+308", "0.22e+308", "")', 'true');
+debug('Fractional numbers');
+shouldBe('stepMismatchFor("0.9", "0.1", "")', 'false');
+shouldBe('stepMismatchFor("0.9", "0.1000001", "")', 'true');
+shouldBe('stepMismatchFor("0.9", "0.1000000000000001", "")', 'false');
+shouldBe('stepMismatchFor("1.0", "0.3333333333333333", "")', 'false');
+
+debug('');
+debug('Range type');
+input.type = 'range';
+// The following test inputs are the same as inputs for type=numbe,
+// but all expected results should be 'false'.
+debug('Empty values');
+shouldBe('stepMismatchFor("", null, null)', 'false');
+shouldBe('stepMismatchFor("", "1.0", "0.1")', 'false');
+debug('Integers');
+shouldBe('stepMismatchFor("1", "2", "0")', 'false');
+shouldBe('stepMismatchFor("-3", "2", "-4")', 'false');
+shouldBe('input.max = "5"; stepMismatchFor("5", "3", "0")', 'false');
+shouldBe('input.value', '"3"'); // Different from type=number.
+debug('Invalid step values');
+input.max = '';
+shouldBe('stepMismatchFor("-3", "-2", "-4")', 'false');
+shouldBe('stepMismatchFor("-3", null, "-4")', 'false');
+shouldBe('stepMismatchFor("-3", undefined, "-4")', 'false');
+debug('Huge numbers and small step; uncomparable');
+shouldBe('stepMismatchFor("1.7976931348623157e+308", "3", "")', 'false');
+shouldBe('stepMismatchFor("1.7976931348623156e+308", "3", "")', 'false');
+shouldBe('stepMismatchFor("1.7976931348623155e+308", "3", "")', 'false');
+debug('Huge numbers and huge step');
+shouldBe('stepMismatchFor("1.60e+308", "0.20e+308", "")', 'false');
+shouldBe('stepMismatchFor("1.60e+308", "0.22e+308", "")', 'false');
+debug('Fractional numbers');
+shouldBe('stepMismatchFor("0.9", "0.1", "")', 'false');
+shouldBe('stepMismatchFor("0.9", "0.1000001", "")', 'false');
+shouldBe('stepMismatchFor("0.9", "0.1000000000000001", "")', 'false');
+shouldBe('stepMismatchFor("1.0", "0.3333333333333333", "")', 'false');
+
+debug('');
 debug('Time type');
 input.type = 'time';
 debug('Empty values');
@@ -188,4 +248,23 @@ shouldBeFalse('stepMismatchFor("2010-W03", "foo", "2010-W02")');
 debug('Special step value');
 shouldBeFalse('stepMismatchFor("2010-W03", "any", "2010-W02")');
 
+debug('');
+debug('Unsupported types');
+shouldBe('input.type = "text"; input.step = "3"; input.min = ""; input.value = "2"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "button"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "checkbox"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "color"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "email"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "hidden"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "image"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "khtml_isindex"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "passwd"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "radio"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "reset"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "search"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "submit"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "tel"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "url"; input.validity.stepMismatch', 'false');
+shouldBe('input.type = "file"; input.validity.stepMismatch', 'false');
+
 var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/input-step-number.js b/LayoutTests/fast/forms/script-tests/input-step-number.js
deleted file mode 100644
index 80b489f..0000000
--- a/LayoutTests/fast/forms/script-tests/input-step-number.js
+++ /dev/null
@@ -1,212 +0,0 @@
-description('Tests stepDown()/stepUp() for type=number.');
-
-var input = document.createElement('input');
-input.type = 'number';
-var invalidStateErr = '"Error: INVALID_STATE_ERR: DOM Exception 11"';
-
-debug('Tests for an invalid current value:');
-input.value = '';
-shouldThrow('input.stepDown()', invalidStateErr);
-shouldThrow('input.stepUp()', invalidStateErr);
-
-// Non-number argument
-debug('stepDown("foo") with value=0:');
-input.value = '0';
-input.stepDown("foo");
-shouldBe('input.value', '"0"');
-
-debug('stepUp("foo") with value=0:');
-input.stepUp("foo");
-shouldBe('input.value', '"0"');
-
-debug('stepDown(null) with value=0:');
-input.stepDown(null);
-shouldBe('input.value', '"0"');
-
-debug('stepUp(null) with value=0:');
-input.stepUp(null);
-shouldBe('input.value', '"0"');
-
-debug('stepDown(undefined) with value=0:');
-input.stepDown(undefined);
-shouldBe('input.value', '"0"');
-
-debug('stepUp(undefined) with value=0:');
-input.stepUp(undefined);
-shouldBe('input.value', '"0"');
-
-// Default step value for type=number is 1.
-debug('stepUp() with value=0:');
-input.value = '0';
-input.stepUp();
-shouldBe('input.value', '"1"');
-
-debug('stepUp(2) with value=1:');
-input.stepUp(2);
-shouldBe('input.value', '"3"');
-
-debug('stepUp(-1) with value=3:');
-input.stepUp(-1);
-shouldBe('input.value', '"2"');
-
-debug('stepDown(-1) with value=2:');
-input.stepDown();
-shouldBe('input.value', '"1"');
-
-debug('stepDown(2) with value=1:');
-input.stepDown(2);
-shouldBe('input.value', '"-1"');
-
-debug('stepDown(-1) with value=-1:');
-input.stepDown(-1);
-shouldBe('input.value', '"0"');
-
-// Extra arguments are ignored.
-debug('stepUp(1, 2) with value=0:');
-input.stepUp(1, 2);
-shouldBe('input.value', '"1"');
-
-debug('stepUp(1, 3) with value=1:');
-input.stepDown(1, 3);
-shouldBe('input.value', '"0"');
-
-// The default value is used for invalid step values.
-debug('stepUp() with value=0 step=foo:');
-input.value = '0';
-input.step = 'foo';
-input.stepUp();
-shouldBe('input.value', '"1"');
-
-debug('stepUp() with value=1 step=0:');
-input.step = '0';
-input.stepUp();
-shouldBe('input.value', '"2"');
-
-debug('stepUp() with value=2 step=-1:');
-input.step = '-1';
-input.stepUp();
-shouldBe('input.value', '"3"');
-
-// No step value
-debug('stepDown() and stepUp() with value=0 step=any:');
-input.value = '0';
-input.step = 'any';
-shouldThrow('input.stepDown()', invalidStateErr);
-shouldThrow('input.stepUp()', invalidStateErr);
-
-// Minimum limit
-debug('stepDown() with value=1 min=0 step=1:');
-input.min = '0';
-input.step = '1';
-input.value = '1';
-input.stepDown();
-shouldBe('input.value', '"0"');
-debug('stepDown() with value=0 min=0 step=1:');
-shouldThrow('input.stepDown()', invalidStateErr);
-
-debug('stepDown(2) with value=1 min=0 step=1:');
-input.value = '1';
-shouldThrow('input.stepDown(2)', invalidStateErr);
-shouldBe('input.value', '"1"');
-
-// Should not be -Infinity.
-debug('stepDown(2) with value=1 step=DBL_MAX:');
-input.value = '1';
-input.min = '';
-input.step = '1.7976931348623156e+308';
-shouldThrow('input.stepDown(2)', invalidStateErr);
-
-// Maximum limit
-debug('stepUp() with value=-1 max=0 step=1:');
-input.value = '-1';
-input.min = '';
-input.max = '0';
-input.step = '1';
-input.stepUp();
-shouldBe('input.value', '"0"');
-debug('stepUp() with value=0 max=0 step=1:');
-shouldThrow('input.stepUp()', invalidStateErr);
-
-debug('stepUp(2) with value=-1 max=0 step=1:');
-input.value = '-1';
-shouldThrow('input.stepUp(2)', invalidStateErr);
-shouldBe('input.value', '"-1"');
-
-// Should not be Infinity.
-debug('stepUp(2) with value=1 step=DBL_MAX:');
-input.value = '1';
-input.max = '';
-input.step = '1.7976931348623156e+308';
-shouldThrow('input.stepUp(2)', invalidStateErr);
-
-// stepDown()/stepUp() for stepMismatch values
-debug('stepUp() with value=0 min=-1 step=2:');
-input.value = '0';
-input.min = '-1';
-input.step = '2';
-input.stepUp();
-shouldBe('input.value', '"3"');
-input.stepDown();
-shouldBe('input.value', '"1"');
-
-debug('stepUp(9) with value=9 min=0 step=10:');
-input.value = '9';
-input.min = '0';
-input.max = '';
-input.step = '10';
-input.stepUp(9);
-shouldBe('input.value', '"100"');
-
-debug('stepDown() with value=19 min=0 step=10:');
-input.value = '19';
-input.stepDown();
-shouldBe('input.value', '"10"');
-
-// value + step is <= max, but rounded result would be > max.
-debug('stepUp() with value=89 min=0 max=99 step=10:');
-input.value = '89';
-input.max = '99';
-shouldThrow('input.stepUp()', invalidStateErr);
-
-// Huge value and small step
-debug('stepUp(999999) with value=1e+308 step=1:');
-input.value = '1e+308';
-input.min = '';
-input.max = '';
-input.step = '1';
-input.stepUp(999999);
-shouldBe('input.value', '"1e+308"');
-input.stepDown(999999);
-shouldBe('input.value', '"1e+308"');
-
-// Fractional numbers
-debug('stepUp(3) with value=0 step=0.33333333333333333:');
-input.value = '0';
-input.min = '';
-input.max = '';
-input.step = '0.33333333333333333';
-input.stepUp(3);
-shouldBe('input.value', '"1"');
-
-debug('stepUp(10) with value=1 step=0.1:');
-input.step = '0.1';
-input.stepUp(10);
-shouldBe('input.value', '"2"');
-debug('stepUp() x10 with value=2 step=0.1:');
-for (var i = 0; i < 10; i++)
-    input.stepUp();
-shouldBe('input.value', '"3"');
-
-debug('stepUp(255) with value=0 min=0 max=1 step=0.003921568627450980:');
-input.value = '0';
-input.min = '0';
-input.max = '1';
-input.step = '0.003921568627450980';
-input.stepUp(255);
-shouldBe('input.value', '"1"');
-debug('stepDown() x255 with value=1 min=0 max=1 step=0.003921568627450980:');
-for (var i = 0; i < 255; i++)
-    input.stepDown();
-shouldBe('input.value', '"0"');
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/input-step-range.js b/LayoutTests/fast/forms/script-tests/input-step-range.js
deleted file mode 100644
index d8745c1..0000000
--- a/LayoutTests/fast/forms/script-tests/input-step-range.js
+++ /dev/null
@@ -1,213 +0,0 @@
-description('Tests stepDown()/stepUp() for type=range.');
-
-var input = document.createElement('input');
-input.type = 'range';
-var invalidStateErr = '"Error: INVALID_STATE_ERR: DOM Exception 11"';
-
-debug('Tests for an invalid current value:');
-input.value = '';
-shouldThrow('input.stepDown()', invalidStateErr);
-shouldThrow('input.stepUp()', invalidStateErr);
-
-// Non-number argument
-debug('stepDown("foo") with value=0:');
-input.value = '0';
-input.stepDown("foo");
-shouldBe('input.value', '"0"');
-
-debug('stepUp("foo") with value=0:');
-input.stepUp("foo");
-shouldBe('input.value', '"0"');
-
-debug('stepDown(null) with value=0:');
-input.stepDown(null);
-shouldBe('input.value', '"0"');
-
-debug('stepUp(null) with value=0:');
-input.stepUp(null);
-shouldBe('input.value', '"0"');
-
-debug('stepDown(undefined) with value=0:');
-input.stepDown(undefined);
-shouldBe('input.value', '"0"');
-
-debug('stepUp(undefined) with value=0:');
-input.stepUp(undefined);
-shouldBe('input.value', '"0"');
-
-// Default step value for type=range is 1.
-debug('stepUp() with value=0 min=-100:');
-input.value = '0';
-input.min = '-100';
-input.stepUp();
-shouldBe('input.value', '"1"');
-
-debug('stepUp(2) with value=1:');
-input.stepUp(2);
-shouldBe('input.value', '"3"');
-
-debug('stepUp(-1) with value=3:');
-input.stepUp(-1);
-shouldBe('input.value', '"2"');
-
-debug('stepDown(-1) with value=2:');
-input.stepDown();
-shouldBe('input.value', '"1"');
-
-debug('stepDown(2) with value=1:');
-input.stepDown(2);
-shouldBe('input.value', '"-1"');
-
-debug('stepDown(-1) with value=-1:');
-input.stepDown(-1);
-shouldBe('input.value', '"0"');
-
-// Extra arguments are ignored.
-debug('stepUp(1, 2) with value=0:');
-input.stepUp(1, 2);
-shouldBe('input.value', '"1"');
-
-debug('stepUp(1, 3) with value=1:');
-input.stepDown(1, 3);
-shouldBe('input.value', '"0"');
-
-// The default value is used for invalid step values.
-debug('stepUp() with value=0 step=foo:');
-input.value = '0';
-input.step = 'foo';
-input.stepUp();
-shouldBe('input.value', '"1"');
-
-debug('stepUp() with value=1 step=0:');
-input.step = '0';
-input.stepUp();
-shouldBe('input.value', '"2"');
-
-debug('stepUp() with value=2 step=-1:');
-input.step = '-1';
-input.stepUp();
-shouldBe('input.value', '"3"');
-
-// No step value
-debug('stepDown() and stepUp() with value=0 step=any:');
-input.value = '0';
-input.step = 'any';
-shouldThrow('input.stepDown()', invalidStateErr);
-shouldThrow('input.stepUp()', invalidStateErr);
-
-// Minimum limit
-debug('stepDown() with value=1 min=0 step=1:');
-input.min = '0';
-input.step = '1';
-input.value = '1';
-input.stepDown();
-shouldBe('input.value', '"0"');
-debug('stepDown() with value=0 min=0 step=1:');
-shouldThrow('input.stepDown()', invalidStateErr);
-
-debug('stepDown(2) with value=1 min=0 step=1:');
-input.value = '1';
-shouldThrow('input.stepDown(2)', invalidStateErr);
-shouldBe('input.value', '"1"');
-
-// Implicit minimum.
-debug('stepDown(2) with value=1 step=DBL_MAX:');
-input.value = '1';
-input.min = '';
-input.step = '1.7976931348623156e+308';
-shouldThrow('input.stepDown(2)', invalidStateErr);
-
-// Maximum limit
-debug('stepUp() with value=-1 min=-100 max=0 step=1:');
-input.value = '-1';
-input.min = '-100';
-input.max = '0';
-input.step = '1';
-input.stepUp();
-shouldBe('input.value', '"0"');
-debug('stepUp() with value=0 min=-100 max=0 step=1:');
-shouldThrow('input.stepUp()', invalidStateErr);
-
-debug('stepUp(2) with value=-1 min=-100 max=0 step=1:');
-input.value = '-1';
-shouldThrow('input.stepUp(2)', invalidStateErr);
-shouldBe('input.value', '"-1"');
-
-// Implicit maximum
-debug('stepUp(2) with value=1 step=DBL_MAX:');
-input.value = '1';
-input.max = '';
-input.step = '1.7976931348623156e+308';
-shouldThrow('input.stepUp(2)', invalidStateErr);
-
-// stepDown()/stepUp() for stepMismatch values
-debug('stepUp() with value=0 min=-1 step=2:');
-input.value = '0';
-input.min = '-1';
-input.step = '2';
-input.stepUp();
-shouldBe('input.value', '"3"');
-input.stepDown();
-shouldBe('input.value', '"1"');
-
-debug('stepUp(9) with value=9 min=0 step=10:');
-input.value = '9';
-input.min = '0';
-input.max = '';
-input.step = '10';
-input.stepUp(9);
-shouldBe('input.value', '"100"');
-
-debug('stepDown() with value=19 min=0 step=10:');
-input.value = '19';
-input.stepDown();
-shouldBe('input.value', '"10"');
-
-// value + step is <= max, but rounded result would be > max.
-debug('stepUp() with value=89 min=0 max=99 step=10:');
-input.value = '89';
-input.max = '99';
-shouldThrow('input.stepUp()', invalidStateErr);
-
-// Huge value and small step
-debug('stepUp(999999) with value=1e+308 min=0 max=1.1e+308 step=1:');
-input.value = '1e+308';
-input.min = '0';
-input.max = '1.1e+308';
-input.step = '1';
-input.stepUp(999999);
-shouldBe('input.value', '"1e+308"');
-input.stepDown(999999);
-shouldBe('input.value', '"1e+308"');
-
-// Fractional numbers
-debug('stepUp(3) with value=0 step=0.33333333333333333:');
-input.value = '0';
-input.min = '';
-input.max = '';
-input.step = '0.33333333333333333';
-input.stepUp(3);
-shouldBe('input.value', '"1"');
-
-debug('stepUp(10) with value=1 step=0.1:');
-input.step = '0.1';
-input.stepUp(10);
-shouldBe('input.value', '"2"');
-debug('stepUp() x10 with value=2 step=0.1:');
-for (var i = 0; i < 10; i++)
-    input.stepUp();
-shouldBe('input.value', '"3"');
-
-debug('stepUp(255) with value=0 min=0 max=1 step=0.003921568627450980:');
-input.value = '0';
-input.min = '0';
-input.max = '1';
-input.step = '0.003921568627450980';
-input.stepUp(255);
-shouldBe('input.value', '"1"');
-debug('stepDown() x255 with value=1 min=0 max=1 step=0.003921568627450980:');
-for (var i = 0; i < 255; i++)
-    input.stepDown();
-shouldBe('input.value', '"0"');
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/input-step-unsupported.js b/LayoutTests/fast/forms/script-tests/input-step-unsupported.js
deleted file mode 100644
index 9ccaf19..0000000
--- a/LayoutTests/fast/forms/script-tests/input-step-unsupported.js
+++ /dev/null
@@ -1,12 +0,0 @@
-description('Tests stepDown()/stepUp() for unsupported types');
-
-var input = document.createElement('input');
-input.type = 'text';
-input.step = '3';
-input.value = '2';
-shouldThrow('input.stepDown()', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
-shouldThrow('input.stepDown(0)', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
-shouldThrow('input.stepUp()', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
-shouldThrow('input.stepUp(0)', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js b/LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js
index 16207b7..2a6eaf8 100644
--- a/LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js
+++ b/LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js
@@ -1,5 +1,4 @@
 description('Check stepUp() and stepDown() bahevior for type=date, datetime, datetime-local, month, time, week.');
-// FIXME: Merge input-step-* into this.
 
 var input = document.createElement('input');
 var invalidStateErr = '"Error: INVALID_STATE_ERR: DOM Exception 11"';
@@ -144,6 +143,122 @@ shouldThrow('stepUp("2010-02", "1", "2010-02")', invalidStateErr);
 shouldThrow('stepDown("2010-02", "1", "2010-02")', invalidStateErr);
 
 debug('');
+debug('Number type');
+input.type = 'number';
+debug('Invalid value');
+shouldThrow('stepUp("", null, null)', invalidStateErr);
+shouldThrow('stepDown("", null, null)', invalidStateErr);
+debug('Non-number arguments');
+shouldBe('stepUp("0", null, null, "0")', '"0"');
+shouldBe('stepDown("0", null, null, "0")', '"0"');
+shouldBe('stepUp("0", null, null, "foo")', '"0"');
+shouldBe('stepDown("0", null, null, "foo")', '"0"');
+shouldBe('stepUp("0", null, null, null)', '"0"');
+shouldBe('stepDown("0", null, null, null)', '"0"');
+debug('Normal cases');
+shouldBe('stepUp("0", null, null)', '"1"');
+shouldBe('stepUp("1", null, null, 2)', '"3"');
+shouldBe('stepUp("3", null, null, -1)', '"2"');
+shouldBe('stepDown("2", null, null)', '"1"');
+shouldBe('stepDown("1", null, null, 2)', '"-1"');
+shouldBe('stepDown("-1", null, null, -1)', '"0"');
+debug('Extra arguments');
+shouldBe('input.value = "0"; input.min = null; input.step = null; input.stepUp(1, 2); input.value', '"1"');
+shouldBe('input.value = "1"; input.stepDown(1, 3); input.value', '"0"');
+debug('Invalid step value');
+shouldBe('stepUp("0", "foo", null)', '"1"');
+shouldBe('stepUp("1", "0", null)', '"2"');
+shouldBe('stepUp("2", "-1", null)', '"3"');
+debug('Step=any');
+shouldThrow('stepUp("0", "any", null)', invalidStateErr);
+shouldThrow('stepDown("0", "any", null)', invalidStateErr);
+debug('Overflow/underflow');
+shouldBe('stepDown("1", "1", "0")', '"0"');
+shouldThrow('stepDown("0", "1", "0")', invalidStateErr);
+shouldThrow('stepDown("1", "1", "0", 2)', invalidStateErr);
+shouldBe('input.value', '"1"');
+shouldThrow('stepDown("1", "1.7976931348623156e+308", "", 2)', invalidStateErr);
+shouldBe('stepUp("-1", "1", "0")', '"0"');
+shouldThrow('stepUp("0", "1", "0")', invalidStateErr);
+shouldThrow('stepUp("-1", "1", "0", 2)', invalidStateErr);
+shouldBe('input.value', '"-1"');
+shouldThrow('stepUp("1", "1.7976931348623156e+308", "", 2)', invalidStateErr);
+debug('stepDown()/stepUp() for stepMismatch values');
+shouldBe('stepUp("1", "2", "")', '"4"');
+shouldBe('input.stepDown(); input.value', '"2"');
+shouldBe('input.min = "0"; stepUp("9", "10", "", 9)', '"100"');
+shouldBe('stepDown("19", "10", "0")', '"10"');
+// value + step is <= max, but rounded result would be > max.
+shouldThrow('stepUp("89", "10", "99")', invalidStateErr);
+debug('Huge value and small step');
+shouldBe('input.min = ""; stepUp("1e+308", "1", "", 999999)', '"1e+308"');
+shouldBe('input.max = ""; stepDown("1e+308", "1", "", 999999)', '"1e+308"');
+debug('Fractional numbers');
+shouldBe('input.min = ""; stepUp("0", "0.33333333333333333", "", 3)', '"1"');
+shouldBe('stepUp("1", "0.1", "", 10)', '"2"');
+shouldBe('input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.value', '"3"');
+shouldBe('input.min = "0"; stepUp("0", "0.003921568627450980", "1", 255)', '"1"');
+shouldBe('for (var i = 0; i < 255; i++) { input.stepDown(); }; input.value', '"0"');
+
+debug('');
+debug('Range type');
+input.type = 'range';
+debug('Invalid value');
+shouldThrow('stepUp("", null, null)', invalidStateErr);
+shouldThrow('stepDown("", null, null)', invalidStateErr);
+debug('Non-number arguments');
+shouldBe('stepUp("0", null, null, "0")', '"0"');
+shouldBe('stepDown("0", null, null, "0")', '"0"');
+shouldBe('stepUp("0", null, null, "foo")', '"0"');
+shouldBe('stepDown("0", null, null, "foo")', '"0"');
+shouldBe('stepUp("0", null, null, null)', '"0"');
+shouldBe('stepDown("0", null, null, null)', '"0"');
+debug('Normal cases');
+shouldBe('stepUp("0", null, null)', '"1"');
+shouldBe('stepUp("1", null, null, 2)', '"3"');
+shouldBe('stepUp("3", null, null, -1)', '"2"');
+shouldBe('stepDown("2", null, "-100")', '"1"');
+shouldBe('stepDown("1", null, "-100", 2)', '"-1"');
+shouldBe('stepDown("-1", null, "-100", -1)', '"0"');
+debug('Extra arguments');
+shouldBe('input.value = "0"; input.min = null; input.step = null; input.stepUp(1, 2); input.value', '"1"');
+shouldBe('input.value = "1"; input.stepDown(1, 3); input.value', '"0"');
+debug('Invalid step value');
+shouldBe('stepUp("0", "foo", null)', '"1"');
+shouldBe('stepUp("1", "0", null)', '"2"');
+shouldBe('stepUp("2", "-1", null)', '"3"');
+debug('Step=any');
+shouldThrow('stepUp("0", "any", null)', invalidStateErr);
+shouldThrow('stepDown("0", "any", null)', invalidStateErr);
+debug('Overflow/underflow');
+shouldBe('stepDown("1", "1", "0")', '"0"');
+shouldThrow('stepDown("0", "1", "0")', invalidStateErr);
+shouldThrow('stepDown("1", "1", "0", 2)', invalidStateErr);
+shouldBe('input.value', '"1"');
+shouldThrow('stepDown("1", "1.7976931348623156e+308", "", 2)', invalidStateErr);
+shouldBe('input.min = "-100"; stepUp("-1", "1", "0")', '"0"');
+shouldThrow('stepUp("0", "1", "0")', invalidStateErr);
+shouldThrow('input.min = "-100"; stepUp("-1", "1", "0", 2)', invalidStateErr);
+shouldBe('input.value', '"-1"');
+shouldThrow('stepUp("1", "1.7976931348623156e+308", "", 2)', invalidStateErr);
+debug('stepDown()/stepUp() for stepMismatch values');
+shouldBe('stepUp("1", "2", "")', '"4"');
+shouldBe('input.stepDown(); input.value', '"2"');
+shouldBe('input.min = "0"; stepUp("9", "10", "", 9)', '"100"');
+shouldBe('stepDown("19", "10", "0")', '"10"');
+// value + step is <= max, but rounded result would be > max.
+shouldThrow('stepUp("89", "10", "99")', invalidStateErr);
+debug('Huge value and small step');
+shouldBe('input.min = "0"; stepUp("1e+308", "1", "1e+308", 999999)', '"1e+308"');
+shouldBe('input.max = "1e+308"; input.min = "0"; input.step = "1"; input.value = "1e+308"; input.stepDown(999999); input.value', '"1e+308"');
+debug('Fractional numbers');
+shouldBe('input.min = ""; stepUp("0", "0.33333333333333333", "", 3)', '"1"');
+shouldBe('stepUp("1", "0.1", "", 10)', '"2"');
+shouldBe('input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.stepUp(); input.value', '"3"');
+shouldBe('input.min = "0"; stepUp("0", "0.003921568627450980", "1", 255)', '"1"');
+shouldBe('for (var i = 0; i < 255; i++) { input.stepDown(); }; input.value', '"0"');
+
+debug('');
 debug('Time type');
 input.type = 'time';
 debug('Invalid value');
@@ -203,4 +318,11 @@ shouldThrow('stepDown("2010-W02", "1.7976931348623156e+308", null)', invalidStat
 shouldThrow('stepUp("2010-W02", "1", "2010-W02")', invalidStateErr);
 shouldThrow('stepDown("2010-W02", "1", "2010-W02")', invalidStateErr);
 
+debug('');
+debug('Unsupported type');
+shouldThrow('input.step = "3"; input.min = ""; input.max = ""; input.value = "2"; input.stepDown()', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
+shouldThrow('input.stepDown(0)', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
+shouldThrow('input.stepUp()', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
+shouldThrow('input.stepUp(0)', '"Error: INVALID_STATE_ERR: DOM Exception 11"');
+
 var successfullyParsed = true;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list