supports.rs (755B)
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 cssparser::{Parser, ParserInput}; 6 use style::stylesheets::supports_rule::SupportsCondition; 7 use style_traits::ToCss; 8 9 #[test] 10 fn test_supports_condition() { 11 assert_roundtrip!(SupportsCondition::parse, "(margin: 1px)"); 12 assert_roundtrip!(SupportsCondition::parse, "not (--be: to be)"); 13 assert_roundtrip!( 14 SupportsCondition::parse, 15 "(color: blue) and future-extension(4)" 16 ); 17 assert_roundtrip!(SupportsCondition::parse, "future-\\1 extension(4)"); 18 assert_roundtrip!(SupportsCondition::parse, "((test))"); 19 }