Commit d4075717 authored by Brian Sheedy's avatar Brian Sheedy Committed by Commit Bot

Further decrease rate of VR content clicks

Further decreases the rate at which clicks are sent to content nodes
during instrumentation tests for the VR browser to ensure that all
clicks are reliably picked up.

Bug: 953990
Change-Id: I6f903f14f2a6bb02fef7e7a76629fa5e038e2e55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1601414
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657764}
parent 0b31015d
...@@ -219,11 +219,13 @@ public class NativeUiUtils { ...@@ -219,11 +219,13 @@ public class NativeUiUtils {
for (int i = 0; i < numClicks; ++i) { for (int i = 0; i < numClicks; ++i) {
clickElement(UserFriendlyElementName.CONTENT_QUAD, clickCoordinates); clickElement(UserFriendlyElementName.CONTENT_QUAD, clickCoordinates);
// Rarely, sending clicks back to back can cause the web contents to miss a click. // Rarely, sending clicks back to back can cause the web contents to miss a click.
// So, if we're going to be sending more, introduce a couple of input-less frames // So, if we're going to be sending more, introduce a few input-less frames to avoid
// to avoid this issue. // this issue. 3 appears to currently be the magic number that lets the web contents
// reliably pick up all clicks.
if (i < numClicks - 1) { if (i < numClicks - 1) {
hoverElement(UserFriendlyElementName.CONTENT_QUAD, clickCoordinates); for (int j = 0; j < 3; ++j) {
hoverElement(UserFriendlyElementName.CONTENT_QUAD, clickCoordinates); hoverElement(UserFriendlyElementName.CONTENT_QUAD, clickCoordinates);
}
} }
} }
}); });
......
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