diff options
author | J. Ryan Stinnett <jryans@gmail.com> | 2017-04-10 09:24:32 +0800 |
---|---|---|
committer | J. Ryan Stinnett <jryans@gmail.com> | 2017-04-12 16:40:17 +0800 |
commit | 4574cd8ea61b56b1fb553b5e4fe765888d419945 (patch) | |
tree | 69ba122f702f15bbecc15291a3d9782860264369 /tests/unit/style/parsing/font.rs | |
parent | a093b0a087d45bff0bb8a7039c8bfb8ec6706442 (diff) | |
download | servo-4574cd8ea61b56b1fb553b5e4fe765888d419945.tar.gz servo-4574cd8ea61b56b1fb553b5e4fe765888d419945.zip |
Pull rule_type into ParserContext
Absorb `rule_type` into the `ParserContext` so that it's easier to pass down to
deeper levels of the parser.
MozReview-Commit-ID: DjBNytLxGKX
Diffstat (limited to 'tests/unit/style/parsing/font.rs')
-rw-r--r-- | tests/unit/style/parsing/font.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/style/parsing/font.rs b/tests/unit/style/parsing/font.rs index 6d44e1f532f..19aa0f12172 100644 --- a/tests/unit/style/parsing/font.rs +++ b/tests/unit/style/parsing/font.rs @@ -9,7 +9,7 @@ use style::parser::ParserContext; use style::properties::longhands::{font_feature_settings, font_weight}; use style::properties::longhands::font_feature_settings::computed_value; use style::properties::longhands::font_feature_settings::computed_value::FeatureTagValue; -use style::stylesheets::Origin; +use style::stylesheets::{CssRuleType, Origin}; use style_traits::ToCss; #[test] @@ -54,7 +54,7 @@ fn font_feature_settings_should_parse_properly() { fn font_feature_settings_should_throw_on_bad_input() { let url = ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; - let context = ParserContext::new(Origin::Author, &url, &reporter); + let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Style)); let mut empty = Parser::new(""); assert!(font_feature_settings::parse(&context, &mut empty).is_err()); @@ -105,7 +105,7 @@ fn font_weight_keyword_should_preserve_keyword() { let url = ServoUrl::parse("http://localhost").unwrap(); let reporter = CSSErrorReporterTest; - let context = ParserContext::new(Origin::Author, &url, &reporter); + let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Style)); let mut parser = Parser::new("normal"); let result = font_weight::parse(&context, &mut parser); assert_eq!(result.unwrap(), SpecifiedValue::Normal); |