Commit b9502e48 authored by Michael Thiessen's avatar Michael Thiessen Committed by Commit Bot

Fix WebVrInputTest.testScreenTapsNotRegistered failing locally

testScreenTapsNotRegistered would fail when run locally with an
INJECT_EVENTS permission error. This CL fixes that by injecting the
event in a slightly different way.

Bug: 
Change-Id: I04277ea74feb3de70a8472839992c9976763544d
Reviewed-on: https://chromium-review.googlesource.com/843203Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526030}
parent cfc2254e
......@@ -13,7 +13,6 @@ import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_V
import android.os.Build;
import android.os.SystemClock;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.MediumTest;
import android.view.MotionEvent;
import android.view.View;
......@@ -43,9 +42,9 @@ import org.chromium.chrome.browser.vr_shell.util.VrTestRuleUtils;
import org.chromium.chrome.browser.vr_shell.util.VrTransitionUtils;
import org.chromium.chrome.test.ChromeActivityTestRule;
import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate;
import org.chromium.content.browser.test.util.ClickUtils;
import org.chromium.content.browser.test.util.Criteria;
import org.chromium.content.browser.test.util.CriteriaHelper;
import org.chromium.content.browser.test.util.TouchCommon;
import java.util.List;
import java.util.concurrent.Callable;
......@@ -107,8 +106,7 @@ public class WebVrInputTest {
touchRegisteredLatch.countDown();
}
});
ClickUtils.mouseSingleClickView(InstrumentationRegistry.getInstrumentation(),
mVrTestRule.getActivity().getWindow().getDecorView().getRootView());
TouchCommon.singleClickView(mVrTestRule.getActivity().getWindow().getDecorView());
Assert.assertTrue("VrShellImpl dispatched touches",
touchRegisteredLatch.await(POLL_TIMEOUT_SHORT_MS, TimeUnit.MILLISECONDS));
VrTestFramework.executeStepAndWait(
......
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