Commit 7c12dfff authored by Suman Nelson Kancherla's avatar Suman Nelson Kancherla Committed by Commit Bot

Fix the failing xr browser transition tests.

testNfcFiresVrdisplayactivate() - fixed by adding the automatic consent dialog handling code.
testPresentationPromiseRejectedIfDonCanceled_WebXr() - fixed by specifying
--shared-prefs-file=//chrome/android/shared_preference_files/test/vr_ddview_don_setupcomplete.json

For the second test, the shared-prefs must be updated on the swarm bots to avoid getting
into a regression.

Bug: 969024
Change-Id: Iaf88f9c202746eca32f7d8386c852eec43824757
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1645633
Commit-Queue: Suman Kancherla <sumankancherla@chromium.org>
Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666586}
parent 1439c226
...@@ -23,6 +23,14 @@ public class WebXrVrTestFramework extends WebXrTestFramework { ...@@ -23,6 +23,14 @@ public class WebXrVrTestFramework extends WebXrTestFramework {
} }
} }
@Override
public void enterSessionWithUserGesture() {
super.enterSessionWithUserGesture();
PermissionUtils.waitForConsentPrompt(getRule().getActivity());
PermissionUtils.acceptConsentPrompt(getRule().getActivity());
}
/** /**
* VR-specific implementation of enterSessionWithUserGesture that includes a workaround for * VR-specific implementation of enterSessionWithUserGesture that includes a workaround for
* receiving broadcasts late. * receiving broadcasts late.
......
...@@ -38,7 +38,6 @@ import org.chromium.base.test.params.ParameterAnnotations.UseRunnerDelegate; ...@@ -38,7 +38,6 @@ import org.chromium.base.test.params.ParameterAnnotations.UseRunnerDelegate;
import org.chromium.base.test.params.ParameterSet; import org.chromium.base.test.params.ParameterSet;
import org.chromium.base.test.params.ParameterizedRunner; import org.chromium.base.test.params.ParameterizedRunner;
import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.MinAndroidSdkLevel; import org.chromium.base.test.util.MinAndroidSdkLevel;
import org.chromium.base.test.util.Restriction; import org.chromium.base.test.util.Restriction;
import org.chromium.base.test.util.UrlUtils; import org.chromium.base.test.util.UrlUtils;
...@@ -207,7 +206,6 @@ public class WebXrVrTransitionTest { ...@@ -207,7 +206,6 @@ public class WebXrVrTransitionTest {
@LargeTest @LargeTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
@XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL}) @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
@DisabledTest(message = "https://crbug.com/969024")
public void testNfcFiresVrdisplayactivate() throws InterruptedException { public void testNfcFiresVrdisplayactivate() throws InterruptedException {
mWebVrTestFramework.loadUrlAndAwaitInitialization( mWebVrTestFramework.loadUrlAndAwaitInitialization(
WebVrTestFramework.getFileUrlForHtmlTestFile("test_nfc_fires_vrdisplayactivate"), WebVrTestFramework.getFileUrlForHtmlTestFile("test_nfc_fires_vrdisplayactivate"),
...@@ -288,7 +286,6 @@ public class WebXrVrTransitionTest { ...@@ -288,7 +286,6 @@ public class WebXrVrTransitionTest {
@MediumTest @MediumTest
@Restriction({RESTRICTION_TYPE_DEVICE_DAYDREAM, RESTRICTION_TYPE_VR_SETTINGS_SERVICE}) @Restriction({RESTRICTION_TYPE_DEVICE_DAYDREAM, RESTRICTION_TYPE_VR_SETTINGS_SERVICE})
@VrSettingsFile(VrSettingsServiceUtils.FILE_DDVIEW_DONENABLED) @VrSettingsFile(VrSettingsServiceUtils.FILE_DDVIEW_DONENABLED)
@DisabledTest(message = "https://crbug.com/969024")
@CommandLineFlags @CommandLineFlags
.Remove({"enable-webvr"}) .Remove({"enable-webvr"})
@CommandLineFlags.Add({"enable-features=WebXR"}) @CommandLineFlags.Add({"enable-features=WebXR"})
......
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