summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/longtask-timing/resources/raflongtask.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/longtask-timing/resources/raflongtask.js')
-rw-r--r--testing/web-platform/tests/longtask-timing/resources/raflongtask.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/testing/web-platform/tests/longtask-timing/resources/raflongtask.js b/testing/web-platform/tests/longtask-timing/resources/raflongtask.js
new file mode 100644
index 0000000000..ec39cb896e
--- /dev/null
+++ b/testing/web-platform/tests/longtask-timing/resources/raflongtask.js
@@ -0,0 +1,5 @@
+window.requestAnimationFrame(function() {
+ /* Generate a slow task. */
+ const begin = window.performance.now();
+ while (window.performance.now() < begin + 60);
+});