mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
script: Use time@0.3
for input elements and do conversion in a &str trait (#33355)
This changes converts all input element parsing and normalization to use `time` instead of `chrono`. `time` is used by our dependencies, so it makes sense to work toward removing the Servo dependency on chrono. In addition, parsing and normalization also moves to a trait on &str to prepare for the possibility of all script parsers moving to a separate crate that can have unit tests written against it. Code duplication is eliminated when possible and more conversion is done using integer types. These two things together mean we pass more tests now. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
687f356db9
commit
8842fe9df5
5 changed files with 528 additions and 482 deletions
|
@ -1,9 +0,0 @@
|
|||
[input-valueasdate.html]
|
||||
[valueAsDate setter on type time (new Date("1970-01-01T00:00:00.000Z"))]
|
||||
expected: FAIL
|
||||
|
||||
[valueAsDate setter on type time (new Date("1970-01-01T12:00:00.000Z"))]
|
||||
expected: FAIL
|
||||
|
||||
[valueAsDate setter on type time (new Date("1970-01-01T23:59:00.000Z"))]
|
||||
expected: FAIL
|
|
@ -1,9 +0,0 @@
|
|||
[input-valueasnumber.html]
|
||||
[valueAsNumber setter on type time (actual valueAsNumber: 86340000, expected value: 23:59)]
|
||||
expected: FAIL
|
||||
|
||||
[valueAsNumber setter on type time (actual valueAsNumber: 43200000, expected value: 12:00)]
|
||||
expected: FAIL
|
||||
|
||||
[valueAsNumber setter on type time (actual valueAsNumber: 0, expected value: 00:00)]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue