summaryrefslogtreecommitdiffstats
path: root/testing/talos/talos/tests/perf-reftest/nth-index-ref.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/talos/talos/tests/perf-reftest/nth-index-ref.html')
-rw-r--r--testing/talos/talos/tests/perf-reftest/nth-index-ref.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/talos/talos/tests/perf-reftest/nth-index-ref.html b/testing/talos/talos/tests/perf-reftest/nth-index-ref.html
new file mode 100644
index 0000000000..819f30686c
--- /dev/null
+++ b/testing/talos/talos/tests/perf-reftest/nth-index-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<style>
+.x:nth-child(200000) { background-color: yellow; }
+.x div, .x span { color: green; }
+</style>
+<script src="util.js"></script>
+<script>
+window.onload = function() {
+ let root = document.createElement("div");
+ root.className = "root";
+ for (let i = 0; i < 200000; i++) {
+ root.appendChild(document.createElement("div"));
+ }
+ let last = root.lastChild;
+ last.appendChild(build_dom(5000, "div"));
+ document.body.appendChild(root);
+ flush_style(root);
+ perf_start();
+ last.className = "x";
+ flush_style(root);
+ perf_finish();
+};
+</script>
+<body></body>