Remove testing feature from style crate

This commit is contained in:
Manish Goregaokar 2017-08-05 23:55:26 -07:00
parent a6369149dc
commit 2ebce54d75
33 changed files with 63 additions and 1181 deletions

View file

@ -14,7 +14,6 @@ use servo_url::ServoUrl;
use std::borrow::ToOwned;
use std::sync::Mutex;
use std::sync::atomic::AtomicBool;
use style::computed_values::font_family::{FamilyName, FamilyNameSyntax};
use style::context::QuirksMode;
use style::error_reporting::{ParseErrorReporter, ContextualParseError};
use style::media_queries::MediaList;
@ -25,8 +24,6 @@ use style::properties::longhands::animation_timing_function;
use style::shared_lock::SharedRwLock;
use style::stylesheets::{Origin, Namespaces};
use style::stylesheets::{Stylesheet, StylesheetContents, NamespaceRule, CssRule, CssRules, StyleRule, KeyframesRule};
use style::stylesheets::font_feature_values_rule::{FFVDeclaration, FontFeatureValuesRule};
use style::stylesheets::font_feature_values_rule::{SingleValue, PairValues, VectorValues};
use style::stylesheets::keyframes_rule::{Keyframe, KeyframeSelector, KeyframePercentage};
use style::values::{KeyframesName, CustomIdent};
use style::values::computed::Percentage;
@ -68,14 +65,6 @@ fn test_parse_stylesheet() {
animation-name: 'foo'; /* animation properties not allowed here */
animation-timing-function: ease; /* … except animation-timing-function */
}
}
@font-feature-values test {
@swash { foo: 12; bar: 24; }
@swash { bar: 36; baz: 48; }
@stylistic { fooo: 14; }
@rubbish { shouldnt-parse: 1; }
@styleset { hello: 10 11 12; }
@character-variant { ok: 78 2; }
}";
let url = ServoUrl::parse("about::test").unwrap();
let lock = SharedRwLock::new();
@ -250,52 +239,7 @@ fn test_parse_stylesheet() {
line: 16,
column: 19,
},
}))),
CssRule::FontFeatureValues(Arc::new(stylesheet.shared_lock.wrap(FontFeatureValuesRule {
family_names: vec![FamilyName {
name: Atom::from("test"),
syntax: FamilyNameSyntax::Identifiers(String::from("test")),
}],
swash: vec![
FFVDeclaration {
name: "foo".into(),
value: SingleValue(12 as u32),
},
FFVDeclaration {
name: "bar".into(),
value: SingleValue(36 as u32),
},
FFVDeclaration {
name: "baz".into(),
value: SingleValue(48 as u32),
}
],
stylistic: vec![
FFVDeclaration {
name: "fooo".into(),
value: SingleValue(14 as u32),
}
],
ornaments: vec![],
annotation: vec![],
character_variant: vec![
FFVDeclaration {
name: "ok".into(),
value: PairValues(78 as u32, Some(2 as u32)),
},
],
styleset: vec![
FFVDeclaration {
name: "hello".into(),
value: VectorValues(vec![10 as u32, 11 as u32, 12 as u32]),
},
],
source_location: SourceLocation {
line: 25,
column: 29,
},
})))
], &stylesheet.shared_lock),
},
media: Arc::new(stylesheet.shared_lock.wrap(MediaList::empty())),