1 A number input fields with a bad input string should make validity.badInput true and have :invalid style.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Initial state. The elment has no value.
7 PASS colorOf(number) is not invalidStyleColor
8 PASS number.validity.badInput is false
9 Type '-'. The element becomes badInput.
10 PASS colorOf(number) is invalidStyleColor
11 PASS number.validity.valid is false
12 PASS number.validity.badInput is true
13 PASS number.value is ""
14 Type '1' additionally. The element becomes valid.
15 PASS colorOf(number) is not invalidStyleColor
16 PASS number.validity.badInput is false
17 PASS number.value is "-1"
18 Type '-' additionally. The element becomes badInput again.
19 PASS colorOf(number) is invalidStyleColor
20 PASS number.validity.badInput is true
21 PASS number.value is ""
22 The element losts focus. The element state should not be changed.
23 PASS colorOf(number) is invalidStyleColor
24 PASS number.validity.badInput is true
25 PASS document.getSelection().toString() is "-1-"
26 PASS number.value is ""
27 The element losts a renderer. The element state should not be changed.
28 PASS number.style.display = "none"; number.validity.badInput is true
29 A bad input should be cleared by value="".
30 PASS number.value = ""; document.execCommand("SelectAll"); document.getSelection().toString() is ""
31 Setting a valud value via |value| IDL attribute should clear badInput.
32 PASS number.validity.badInput is true
33 PASS number.checkValidity() is false
34 PASS number.validity.badInput is false
35 PASS number.checkValidity() is true
36 PASS successfullyParsed is true