mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Remove testing feature from style crate
This commit is contained in:
parent
a6369149dc
commit
2ebce54d75
33 changed files with 63 additions and 1181 deletions
|
@ -13,6 +13,7 @@ use style::properties::{longhands, Importance, PropertyDeclaration, PropertyDecl
|
|||
use style::rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource};
|
||||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylesheets::{Origin, Stylesheet, CssRule};
|
||||
use style::thread_state;
|
||||
use test::{self, Bencher};
|
||||
|
||||
struct ErrorringErrorReporter;
|
||||
|
@ -92,6 +93,7 @@ fn test_insertion_style_attribute(rule_tree: &RuleTree, rules: &[(StyleSource, C
|
|||
#[bench]
|
||||
fn bench_insertion_basic(b: &mut Bencher) {
|
||||
let r = RuleTree::new();
|
||||
thread_state::initialize(thread_state::SCRIPT);
|
||||
|
||||
let rules_matched = parse_rules(
|
||||
".foo { width: 200px; } \
|
||||
|
@ -110,6 +112,7 @@ fn bench_insertion_basic(b: &mut Bencher) {
|
|||
#[bench]
|
||||
fn bench_insertion_basic_per_element(b: &mut Bencher) {
|
||||
let r = RuleTree::new();
|
||||
thread_state::initialize(thread_state::SCRIPT);
|
||||
|
||||
let rules_matched = parse_rules(
|
||||
".foo { width: 200px; } \
|
||||
|
@ -126,6 +129,7 @@ fn bench_insertion_basic_per_element(b: &mut Bencher) {
|
|||
#[bench]
|
||||
fn bench_expensive_insertion(b: &mut Bencher) {
|
||||
let r = RuleTree::new();
|
||||
thread_state::initialize(thread_state::SCRIPT);
|
||||
|
||||
// This test case tests a case where you style a bunch of siblings
|
||||
// matching the same rules, with a different style attribute each
|
||||
|
@ -148,6 +152,7 @@ fn bench_expensive_insertion(b: &mut Bencher) {
|
|||
#[bench]
|
||||
fn bench_insertion_basic_parallel(b: &mut Bencher) {
|
||||
let r = RuleTree::new();
|
||||
thread_state::initialize(thread_state::SCRIPT);
|
||||
|
||||
let rules_matched = parse_rules(
|
||||
".foo { width: 200px; } \
|
||||
|
@ -177,8 +182,9 @@ fn bench_insertion_basic_parallel(b: &mut Bencher) {
|
|||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_expensive_insersion_parallel(b: &mut Bencher) {
|
||||
fn bench_expensive_insertion_parallel(b: &mut Bencher) {
|
||||
let r = RuleTree::new();
|
||||
thread_state::initialize(thread_state::SCRIPT);
|
||||
|
||||
let rules_matched = parse_rules(
|
||||
".foo { width: 200px; } \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue