Bug 1402143 - Re-enable nth-index-cache style-perf singleton tests; r?jmaher draft
authorRob Wood <rwood@mozilla.com>
Fri, 29 Sep 2017 09:35:02 -0400
changeset 672615 47cb32069e154e68eb557c1e6a993be732e53796
parent 671347 50722cd6558f35512e4cd5597e2f815dfb1b6886
child 733852 629a51fc9d4afde14ba8337603b5733d5ff57739
push id82301
push userrwood@mozilla.com
push dateFri, 29 Sep 2017 13:38:59 +0000
reviewersjmaher
bugs1402143
milestone58.0a1
Bug 1402143 - Re-enable nth-index-cache style-perf singleton tests; r?jmaher MozReview-Commit-ID: 6W8JKtUuzqI
testing/talos/talos/tests/perf-reftest-singletons/nth-index-1.html
testing/talos/talos/tests/perf-reftest-singletons/nth-index-2.html
testing/talos/talos/tests/perf-reftest-singletons/perf_reftest_singletons.manifest
new file mode 100644
--- /dev/null
+++ b/testing/talos/talos/tests/perf-reftest-singletons/nth-index-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<style>
+.x:nth-child(200000) { background-color: yellow; }
+.x:nth-child(200000) div, .x:nth-child(200000) 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>
new file mode 100644
--- /dev/null
+++ b/testing/talos/talos/tests/perf-reftest-singletons/nth-index-2.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<style>
+.x:nth-of-type(200000) { background-color: yellow; }
+.x:nth-of-type(200000) div, .x:nth-of-type(200000) 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>
--- a/testing/talos/talos/tests/perf-reftest-singletons/perf_reftest_singletons.manifest
+++ b/testing/talos/talos/tests/perf-reftest-singletons/perf_reftest_singletons.manifest
@@ -6,8 +6,10 @@
 % http://localhost/tests/perf-reftest-singletons/only-children-1.html
 % http://localhost/tests/perf-reftest-singletons/slow-selector-1.html
 % http://localhost/tests/perf-reftest-singletons/slow-selector-2.html
 % http://localhost/tests/perf-reftest-singletons/style-attr-1.html
 % http://localhost/tests/perf-reftest-singletons/coalesce-1.html
 % http://localhost/tests/perf-reftest-singletons/coalesce-2.html
 % http://localhost/tests/perf-reftest-singletons/parent-basic-singleton.html
 % http://localhost/tests/perf-reftest-singletons/tiny-traversal-singleton.html
+% http://localhost/tests/perf-reftest-singletons/nth-index-1.html
+% http://localhost/tests/perf-reftest-singletons/nth-index-2.html