Commit 03806c23 authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Have page_with_touch_start_janking_main_thread.html work on desktop

page_with_touch_start_janking_main_thread.html currently does nothing on
desktop as the setting of ontouchstart seems to be ignored. I imagine this is due
to https://groups.google.com/a/chromium.org/d/msg/blink-dev/KV6kqDJpYiE/YFM28ZNBBAAJ

Bug: None
Change-Id: I7ec67e8f42445eec4583d1b6f5aae5e0ea2d7d9f
Reviewed-on: https://chromium-review.googlesource.com/c/1396326Reviewed-by: default avatarElla Ge <eirage@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620028}
parent 49e7497e
......@@ -10,10 +10,10 @@
</body>
<script>
function setup() {
janktest.ontouchstart = function() {
document.getElementById('janktest').addEventListener('touchstart', (e) => {
var end = performance.now() + 1200;
while (performance.now() < end) ;
};
while (performance.now() < end);
}, {passive: false});
}
</script>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment