summaryrefslogtreecommitdiffstats
path: root/testing/talos/talos/tests/perf-reftest-singletons/id-getter-4.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/talos/talos/tests/perf-reftest-singletons/id-getter-4.html')
-rw-r--r--testing/talos/talos/tests/perf-reftest-singletons/id-getter-4.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/talos/talos/tests/perf-reftest-singletons/id-getter-4.html b/testing/talos/talos/tests/perf-reftest-singletons/id-getter-4.html
new file mode 100644
index 0000000000..2a6849da30
--- /dev/null
+++ b/testing/talos/talos/tests/perf-reftest-singletons/id-getter-4.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<script src="util.js"></script>
+<script>
+onload = function() {
+ var count = 20000000;
+ var el = document.createElement("span");
+ // The longest string we can fit in an autostring buffer (63 chars).
+ el.id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
+ var getter = Object.getOwnPropertyDescriptor(Element.prototype, "id").get;
+ perf_start();
+ for (var i = 0; i < count; ++i) {
+ getter.call(el);
+ }
+ perf_finish();
+};
+</script>