/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! Tests for parsing and serialization of values/properties
use cssparser::{Parser, ParserInput}; use style::context::QuirksMode; use style::parser::ParserContext; use style::stylesheets::{CssRuleType, Origin}; use style_traits::{ParseError, ParsingMode};
// This is a macro so that the file/line information // is preserved in the panic
macro_rules! assert_roundtrip_with_context {
($fun:expr, $string:expr) => {
assert_roundtrip_with_context!($fun, $string, $string);
};
($fun:expr, $input:expr, $output:expr) => {{ letmut input = ::cssparser::ParserInput::new($input); let serialized = super::parse_input(
|context, i| { let parsed = $fun(context, i).expect(&format!("Failed to parse {}", $input)); let serialized = ToCss::to_css_string(&parsed);
assert_eq!(serialized, $output);
Ok(serialized)
},
&mut input,
)
.unwrap();
letmut input = ::cssparser::ParserInput::new(&serialized); let unwrapped = super::parse_input(
|context, i| { let re_parsed =
$fun(context, i).expect(&format!("Failed to parse serialization {}", $input)); let re_serialized = ToCss::to_css_string(&re_parsed);
assert_eq!(serialized, re_serialized);
Ok(())
},
&mut input,
)
.unwrap();
unwrapped
}};
}
mod animation; mod background; mod border; mod box_; mod column; mod effects; mod image; mod inherited_text; mod outline; mod position; mod selectors; mod supports; mod text_overflow; mod transition_duration; mod transition_timing_function;
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-20)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.