summaryrefslogtreecommitdiffstats
path: root/testing/talos/talos/tests/perf-reftest-singletons/external-string-pass.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/talos/talos/tests/perf-reftest-singletons/external-string-pass.html')
-rw-r--r--testing/talos/talos/tests/perf-reftest-singletons/external-string-pass.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/talos/talos/tests/perf-reftest-singletons/external-string-pass.html b/testing/talos/talos/tests/perf-reftest-singletons/external-string-pass.html
new file mode 100644
index 0000000000..459dacab0b
--- /dev/null
+++ b/testing/talos/talos/tests/perf-reftest-singletons/external-string-pass.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<script src="util.js"></script>
+<script>
+ onload = function() {
+ var str = new Array(1e6).join("a");
+ var div = document.createElement("div");
+ // Round-trip through the DOM to make sure we have an external string.
+ div.setAttribute("x", str);
+ str = div.getAttribute("x");
+ var count = 3e7; // About 1s
+ var t = new DataTransfer();
+ perf_start();
+ for (let i = count; i > 0; --i) {
+ t.dropEffect = str;
+ }
+ perf_finish();
+ };
+</script>