mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Add test cases for transition-duration.
This commit is contained in:
parent
130a08f0b5
commit
2e3f45b66b
2 changed files with 18 additions and 0 deletions
|
@ -105,6 +105,7 @@ mod selectors;
|
|||
mod supports;
|
||||
mod text;
|
||||
mod text_overflow;
|
||||
mod transition_duration;
|
||||
mod transition_property;
|
||||
mod transition_timing_function;
|
||||
mod ui;
|
||||
|
|
17
tests/unit/style/parsing/transition_duration.rs
Normal file
17
tests/unit/style/parsing/transition_duration.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use parsing::parse;
|
||||
use style::properties::longhands::transition_duration;
|
||||
|
||||
#[test]
|
||||
fn test_positive_transition_duration() {
|
||||
assert!(parse(transition_duration::parse, "5s").is_ok());
|
||||
assert!(parse(transition_duration::parse, "0s").is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_negative_transition_duration() {
|
||||
assert!(parse(transition_duration::parse, "-5s").is_err());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue