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 http://mozilla.org/MPL/2.0/. */
4 
5 use parsing::parse;
6 use style_traits::ToCss;
7 
8 #[test]
test_outline_style()9 fn test_outline_style() {
10     use style::properties::longhands::outline_style;
11 
12     assert_roundtrip_with_context!(outline_style::parse, r#"auto"#);
13     assert_roundtrip_with_context!(outline_style::parse, r#"none"#);
14     assert_roundtrip_with_context!(outline_style::parse, r#"solid"#);
15     assert_roundtrip_with_context!(outline_style::parse, r#"double"#);
16     assert_roundtrip_with_context!(outline_style::parse, r#"dotted"#);
17     assert_roundtrip_with_context!(outline_style::parse, r#"dashed"#);
18     assert_roundtrip_with_context!(outline_style::parse, r#"groove"#);
19     assert_roundtrip_with_context!(outline_style::parse, r#"ridge"#);
20     assert_roundtrip_with_context!(outline_style::parse, r#"inset"#);
21     assert_roundtrip_with_context!(outline_style::parse, r#"outset"#);
22 
23     // The outline-style property accepts the same values as border-style,
24     // except that 'hidden' is not a legal outline style.
25     assert!(parse(outline_style::parse, r#"hidden"#).is_err());
26 }
27