blob: d2ba23db5f8351838ac31fd535ec6dce2c9aa116 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../resources/runner.js"></script>
<script src="resources/utils.js"></script>
</head>
<body>
</body>
<script>
createRegularDOMTree();
PerfTestRunner.measureTime({
description: "Measures the performance of a nth-child selector.",
run: function() {
var rule = applyCSSRule("div:nth-child(1) div { color: red; }");
forceStyleRecalc(document.body);
rule.remove();
forceStyleRecalc(document.body);
},
tracingCategories: 'blink',
traceEventsToMeasure: [
'Document::updateStyle',
'Document::recalcStyle',
'Document::rebuildLayoutTree'
]
});
</script>
</html>