fixup! Add an extra data field to ParserContext.

This commit is contained in:
Cameron McCormack 2016-05-24 14:03:55 +10:00
parent e75b1c3b32
commit f2b1ef4e45
3 changed files with 13 additions and 6 deletions

View file

@ -9,6 +9,7 @@ use std::borrow::ToOwned;
use std::sync::Arc;
use std::sync::Mutex;
use string_cache::{Atom, Namespace};
use style::parser::ParserContextExtraData;
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, DeclaredValue, longhands};
use style::stylesheets::{CSSRule, StyleRule, Origin};
use style::error_reporting::ParseErrorReporter;
@ -26,7 +27,8 @@ fn test_parse_stylesheet() {
";
let url = Url::parse("about::test").unwrap();
let stylesheet = Stylesheet::from_str(css, url, Origin::UserAgent,
Box::new(CSSErrorReporterTest));
Box::new(CSSErrorReporterTest),
ParserContextExtraData::default());
assert_eq!(stylesheet, Stylesheet {
origin: Origin::UserAgent,
media: None,
@ -205,7 +207,8 @@ 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, error_reporter,
ParserContextExtraData::default());
let mut errors = errors.lock().unwrap();