Commit f486545d authored by Alex Cooper's avatar Alex Cooper Committed by Commit Bot

Update Disabled state for TestControllerInputRegistered

Rather than disabling TestControllerInputRegistered for all runtimes,
this "disables" (by way of an early return) just the OpenVr runtime,
which is the one that is flaky.

To do this, it also adds a macro "WEBXR_VR_DISABLE_TEST_ON" which can
be used to do something similar in the future when only one runtime
should be disabled.

Bug: 1033087
Change-Id: Ieda1b084a8c888333bf1ac2875e911e3d537e832
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1963096Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723987}
parent eff3782b
......@@ -131,4 +131,9 @@
test_name)
#endif // ENABLE_OPENXR
// Helper class to disable a specific runtime of the above
#define WEBXR_VR_DISABLE_TEST_ON(runtime) \
if (t->GetRuntimeType() == runtime) \
return
#endif // CHROME_BROWSER_VR_TEST_MULTI_CLASS_BROWSER_TEST_H_
......@@ -4,7 +4,6 @@
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/vr/test/mock_xr_device_hook_base.h"
#include "chrome/browser/vr/test/multi_class_browser_test.h"
#include "chrome/browser/vr/test/webxr_vr_browser_test.h"
......@@ -960,14 +959,9 @@ IN_PROC_BROWSER_TEST_F(WebXrVrWmrBrowserTest, TestVoiceSelectRegistered) {
// Test that controller input is registered via WebXR's input method.
// Equivalent to
// WebXrVrInputTest#testControllerClicksRegisteredOnDaydream_WebXr.
// Fails on Win only. http://crbug.com/1033087
#if defined(OS_WIN)
#define MAYBE_TestControllerInputRegistered \
DISABLED_TestControllerInputRegistered
#else
#define MAYBE_TestControllerInputRegistered TestControllerInputRegistered
#endif
WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(MAYBE_TestControllerInputRegistered) {
WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(TestControllerInputRegistered) {
// TODO(crbug.com/1033087): Test is flaky on OpenVR
WEBXR_VR_DISABLE_TEST_ON(XrBrowserTestBase::RuntimeType::RUNTIME_OPENVR);
WebXrControllerInputMock my_mock;
unsigned int controller_index = my_mock.CreateAndConnectMinimalGamepad();
......
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