Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / PerformanceTests / CSS / PseudoClassSelectors.html
blob289b77887218d67294e46acc5e7a17a59b0ae02d
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <div id="test-target">
5 <div>
6 <div></div>
7 <div>
8 <p></p>
9 <p></p>
10 <p></p>
11 </div>
12 <div></div>
13 </div>
14 <div>
15 <div>
16 <p></p>
17 </div>
18 </div>
19 <p></p>
20 <p></p>
21 <p></p>
22 <p></p>
23 </div>
24 <script src="../resources/runner.js"></script>
25 <script>
26 PerfTestRunner.measureRunsPerSecond({
27 description: "This benchmark tests CSS Selector performance with querySelector().",
28 run: function() {
29 for (var i = 0; i < 100; i++) {
30 document.querySelector("p:first-child");
31 document.querySelector("p:last-child");
32 document.querySelector("p:first-of-type");
33 document.querySelector("p:last-of-type");
34 document.querySelector("p:nth-child(4n+3)");
35 document.querySelector("p:nth-last-child(4n+3)");
36 document.querySelector("p:nth-of-type(4n+3)");
37 document.querySelector("p:nth-last-of-type(4n+3)");
40 });
41 </script>
42 </body>
43 </html>