Added time input sanitization:

- Implemented is_valid_time_string for DOMString.
- Use is_valid_time_string for sanitize_value with time input.
- Improved input type change test
This commit is contained in:
Simon Wörner 2017-11-26 15:13:02 +01:00 committed by Simon Wörner
parent ac6e04ebfb
commit a999239f28
8 changed files with 228 additions and 157 deletions

View file

@ -1,23 +0,0 @@
[time-2.html]
type: testharness
[Invalid value: fraction should have one, two or three ASCII digits. Value should be empty]
expected: FAIL
[Invalid value: hour should have two ASCII digits. Value should be empty]
expected: FAIL
[Invalid value: minutes should have two ASCII digits. Value should be empty]
expected: FAIL
[Invalid value: seconds should have two ASCII digits. Value should be empty]
expected: FAIL
[Invalid value: hour > 23. Value should be empty]
expected: FAIL
[Invalid value: minute > 59. Value should be empty]
expected: FAIL
[Invalid value: second > 59. Value should be empty]
expected: FAIL

View file

@ -69,9 +69,6 @@
[ empty value of stepUp]
expected: FAIL
[set value on not time format value]
expected: FAIL
[stepUp on step value with fractional seconds]
expected: FAIL

View file

@ -15,9 +15,6 @@
[change state from hidden to week]
expected: FAIL
[change state from hidden to time]
expected: FAIL
[change state from hidden to number]
expected: FAIL
@ -39,9 +36,6 @@
[change state from text to week]
expected: FAIL
[change state from text to time]
expected: FAIL
[change state from text to number]
expected: FAIL
@ -63,9 +57,6 @@
[change state from search to week]
expected: FAIL
[change state from search to time]
expected: FAIL
[change state from search to number]
expected: FAIL
@ -87,9 +78,6 @@
[change state from tel to week]
expected: FAIL
[change state from tel to time]
expected: FAIL
[change state from tel to number]
expected: FAIL
@ -120,9 +108,6 @@
[change state from url to week]
expected: FAIL
[change state from url to time]
expected: FAIL
[change state from url to number]
expected: FAIL
@ -162,9 +147,6 @@
[change state from email to week]
expected: FAIL
[change state from email to time]
expected: FAIL
[change state from email to number]
expected: FAIL
@ -186,9 +168,6 @@
[change state from password to week]
expected: FAIL
[change state from password to time]
expected: FAIL
[change state from password to number]
expected: FAIL
@ -222,9 +201,6 @@
[change state from datetime to week]
expected: FAIL
[change state from datetime to time]
expected: FAIL
[change state from datetime to number]
expected: FAIL
@ -264,9 +240,6 @@
[change state from date to week]
expected: FAIL
[change state from date to time]
expected: FAIL
[change state from date to number]
expected: FAIL
@ -306,9 +279,6 @@
[change state from month to week]
expected: FAIL
[change state from month to time]
expected: FAIL
[change state from month to number]
expected: FAIL
@ -348,57 +318,12 @@
[change state from week to month]
expected: FAIL
[change state from week to time]
expected: FAIL
[change state from week to number]
expected: FAIL
[change state from week to range]
expected: FAIL
[change state from time to hidden]
expected: FAIL
[change state from time to checkbox]
expected: FAIL
[change state from time to radio]
expected: FAIL
[change state from time to submit]
expected: FAIL
[change state from time to image]
expected: FAIL
[change state from time to reset]
expected: FAIL
[change state from time to button]
expected: FAIL
[change state from time to email]
expected: FAIL
[change state from time to datetime]
expected: FAIL
[change state from time to date]
expected: FAIL
[change state from time to month]
expected: FAIL
[change state from time to week]
expected: FAIL
[change state from time to number]
expected: FAIL
[change state from time to range]
expected: FAIL
[change state from number to hidden]
expected: FAIL
@ -435,9 +360,6 @@
[change state from number to week]
expected: FAIL
[change state from number to time]
expected: FAIL
[change state from number to range]
expected: FAIL
@ -477,9 +399,6 @@
[change state from range to week]
expected: FAIL
[change state from range to time]
expected: FAIL
[change state from range to number]
expected: FAIL
@ -498,9 +417,6 @@
[change state from checkbox to week]
expected: FAIL
[change state from checkbox to time]
expected: FAIL
[change state from checkbox to number]
expected: FAIL
@ -522,9 +438,6 @@
[change state from radio to week]
expected: FAIL
[change state from radio to time]
expected: FAIL
[change state from radio to number]
expected: FAIL
@ -546,9 +459,6 @@
[change state from submit to week]
expected: FAIL
[change state from submit to time]
expected: FAIL
[change state from submit to number]
expected: FAIL
@ -570,9 +480,6 @@
[change state from image to week]
expected: FAIL
[change state from image to time]
expected: FAIL
[change state from image to number]
expected: FAIL
@ -594,9 +501,6 @@
[change state from reset to week]
expected: FAIL
[change state from reset to time]
expected: FAIL
[change state from reset to number]
expected: FAIL
@ -618,9 +522,6 @@
[change state from button to week]
expected: FAIL
[change state from button to time]
expected: FAIL
[change state from button to number]
expected: FAIL
@ -681,9 +582,6 @@
[change state from datetime-local to week]
expected: FAIL
[change state from datetime-local to time]
expected: FAIL
[change state from datetime-local to number]
expected: FAIL
@ -699,9 +597,6 @@
[change state from week to datetime-local]
expected: FAIL
[change state from time to datetime-local]
expected: FAIL
[change state from number to datetime-local]
expected: FAIL
@ -726,3 +621,120 @@
[change state from button to datetime-local]
expected: FAIL
[change state from datetime-local to text]
expected: FAIL
[change state from datetime-local to search]
expected: FAIL
[change state from datetime-local to tel]
expected: FAIL
[change state from datetime-local to url]
expected: FAIL
[change state from datetime-local to password]
expected: FAIL
[change state from date to text]
expected: FAIL
[change state from date to search]
expected: FAIL
[change state from date to tel]
expected: FAIL
[change state from date to url]
expected: FAIL
[change state from date to password]
expected: FAIL
[change state from month to text]
expected: FAIL
[change state from month to search]
expected: FAIL
[change state from month to tel]
expected: FAIL
[change state from month to url]
expected: FAIL
[change state from month to password]
expected: FAIL
[change state from week to text]
expected: FAIL
[change state from week to search]
expected: FAIL
[change state from week to tel]
expected: FAIL
[change state from week to url]
expected: FAIL
[change state from week to password]
expected: FAIL
[change state from number to text]
expected: FAIL
[change state from number to search]
expected: FAIL
[change state from number to tel]
expected: FAIL
[change state from number to url]
expected: FAIL
[change state from number to password]
expected: FAIL
[change state from color to datetime-local]
expected: FAIL
[change state from color to date]
expected: FAIL
[change state from color to month]
expected: FAIL
[change state from color to week]
expected: FAIL
[change state from color to number]
expected: FAIL
[change state from color to range]
expected: FAIL
[change state from time to range]
expected: FAIL
[change state from range to text]
expected: FAIL
[change state from range to search]
expected: FAIL
[change state from range to tel]
expected: FAIL
[change state from range to url]
expected: FAIL
[change state from range to password]
expected: FAIL

View file

@ -24,12 +24,6 @@
[value IDL attribute of input type week with value attribute]
expected: FAIL
[value IDL attribute of input type time without value attribute]
expected: FAIL
[value IDL attribute of input type time with value attribute]
expected: FAIL
[value IDL attribute of input type number without value attribute]
expected: FAIL