style: Add CSS Error for DisallowedImportRule.

- Add new CSS Error
- Add new test case for error
- Ensure that test cases use `replace()` and `replaceSync()`

Differential Revision: https://phabricator.services.mozilla.com/D69423
This commit is contained in:
Erik Nordin 2020-04-08 22:45:24 +00:00 committed by Emilio Cobos Álvarez
parent c55cd22339
commit 87139a3ea2
2 changed files with 3 additions and 2 deletions

View file

@ -193,7 +193,7 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
}
if let AllowImportRules::No = self.allow_import_rules {
return Err(input.new_custom_error(StyleParseErrorKind::UnexpectedImportRule))
return Err(input.new_custom_error(StyleParseErrorKind::DisallowedImportRule))
}
// FIXME(emilio): We should always be able to have a loader