diff --git a/components/style/stylesheets/rule_parser.rs b/components/style/stylesheets/rule_parser.rs index 6fddada91d7..7437e76f701 100644 --- a/components/style/stylesheets/rule_parser.rs +++ b/components/style/stylesheets/rule_parser.rs @@ -331,7 +331,7 @@ impl<'a, 'b, R: ParseErrorReporter> NestedRuleParser<'a, 'b, R> { Ok(rule) => rules.push(rule), Err((error, slice)) => { let location = error.location; - let error = ContextualParseError::UnsupportedRule(slice, error); + let error = ContextualParseError::InvalidRule(slice, error); self.context.log_css_error(self.error_context, location, error); } } diff --git a/tests/unit/style/stylesheets.rs b/tests/unit/style/stylesheets.rs index 3e3cd1839c1..66d6bf9b2eb 100644 --- a/tests/unit/style/stylesheets.rs +++ b/tests/unit/style/stylesheets.rs @@ -354,9 +354,8 @@ fn test_report_error_stylesheet() { // When @font-feature-values is supported, this should be replaced with two errors (15, 25, "Invalid rule: '@font-feature-values "), - // FIXME: the message of these two should be consistent (16, 13, "Invalid rule: '@invalid'"), - (17, 29, "Unsupported rule: '@invalid'"), + (17, 29, "Invalid rule: '@invalid'"), (18, 34, "Invalid rule: '@supports "), (19, 26, "Invalid keyframe rule: 'from invalid '"),