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