mirror of
https://github.com/servo/servo.git
synced 2025-08-22 13:55:34 +01:00
Add ServoUrl as a parameter to report_error(...) of ParseErrorReporter
passes test-tidy removed match and used map added new test test_report_error_passing_correct_url(...) and modified old unit tests removed the option for servourl and tidied up removed the duplicate test. made a few more changes after @cbrewster suggestions. changed _url to url in few places fixed the indenting
This commit is contained in:
parent
c62973b77b
commit
f48f0567cf
7 changed files with 36 additions and 19 deletions
|
@ -17,8 +17,9 @@ use test::{self, Bencher};
|
|||
|
||||
struct ErrorringErrorReporter;
|
||||
impl ParseErrorReporter for ErrorringErrorReporter {
|
||||
fn report_error(&self, _: &mut Parser, position: SourcePosition, message: &str) {
|
||||
panic!("CSS error: {:?} {}", position, message);
|
||||
fn report_error(&self, input: &mut Parser, position: SourcePosition, message: &str,
|
||||
url: &ServoUrl) {
|
||||
panic!("CSS error: {}\t\n{:?} {}", url.as_str(), position, message);
|
||||
}
|
||||
|
||||
fn clone(&self) -> Box<ParseErrorReporter + Send + Sync> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue