tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

transition_duration.rs (574B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
      4 
      5 use parsing::parse;
      6 use style::properties::longhands::transition_duration;
      7 
      8 #[test]
      9 fn test_positive_transition_duration() {
     10    assert!(parse(transition_duration::parse, "5s").is_ok());
     11    assert!(parse(transition_duration::parse, "0s").is_ok());
     12 }
     13 
     14 #[test]
     15 fn test_negative_transition_duration() {
     16    assert!(parse(transition_duration::parse, "-5s").is_err());
     17 }