diff --git a/tests/unit/style/size_of.rs b/tests/unit/style/size_of.rs index 60d8c7b4ac0..486fecf4e25 100644 --- a/tests/unit/style/size_of.rs +++ b/tests/unit/style/size_of.rs @@ -2,8 +2,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +use style::invalidation::element::invalidation_map::Dependency; use style::properties; +size_of_test!(test_size_of_dependency, Dependency, 16); + size_of_test!(test_size_of_property_declaration, properties::PropertyDeclaration, 32); // This is huge, but we allocate it on the stack and then never move it, diff --git a/tests/unit/style/stylist.rs b/tests/unit/style/stylist.rs index 0f371967efb..13e9ae24f5c 100644 --- a/tests/unit/style/stylist.rs +++ b/tests/unit/style/stylist.rs @@ -5,8 +5,8 @@ use cssparser::SourceLocation; use euclid::TypedSize2D; use html5ever::LocalName; +use selectors::parser::{AncestorHashes, Selector}; use selectors::parser::LocalName as LocalNameSelector; -use selectors::parser::Selector; use servo_atoms::Atom; use style::context::QuirksMode; use style::media_queries::{Device, MediaType}; @@ -45,7 +45,7 @@ fn get_mock_rules(css_selectors: &[&str]) -> (Vec>, SharedRwLock) { let guard = shared_lock.read(); let rule = locked.read_with(&guard); rule.selectors.0.iter().map(|s| { - Rule::new(s.selector.clone(), s.hashes.clone(), locked.clone(), i as u32) + Rule::new(s.clone(), AncestorHashes::new(s), locked.clone(), i as u32) }).collect() }).collect(), shared_lock) } @@ -68,7 +68,7 @@ fn parse_selectors(selectors: &[&str]) -> Vec> { .map(|x| SelectorParser::parse_author_origin_no_namespace(x).unwrap().0 .into_iter() .nth(0) - .unwrap().selector) + .unwrap()) .collect() }