Replace Stylesheet::set_media with a constructor argument

This commit is contained in:
Simon Sapin 2016-11-15 16:43:33 +01:00
parent f4dcc38816
commit 236c575c50
8 changed files with 29 additions and 31 deletions

View file

@ -49,7 +49,7 @@ fn test_parse_stylesheet() {
}
}";
let url = ServoUrl::parse("about::test").unwrap();
let stylesheet = Stylesheet::from_str(css, url, Origin::UserAgent,
let stylesheet = Stylesheet::from_str(css, url, Origin::UserAgent, Default::default(),
Box::new(CSSErrorReporterTest),
ParserContextExtraData::default());
let expected = Stylesheet {
@ -320,7 +320,7 @@ fn test_report_error_stylesheet() {
let errors = error_reporter.errors.clone();
Stylesheet::from_str(css, url, Origin::UserAgent, error_reporter,
Stylesheet::from_str(css, url, Origin::UserAgent, Default::default(), error_reporter,
ParserContextExtraData::default());
let mut errors = errors.lock().unwrap();