immersive-web / webxr-test-api

WPT testing API for WebXR
https://immersive-web.github.io/webxr-test-api/
14 stars 15 forks source link

Using TestDriver for user activation #6

Closed offenwanger closed 5 years ago

offenwanger commented 6 years ago

Should we use TestDriver's click for user activation instead of simulateUserActivation?

TestDriver is built on WebDriver offers a click function which is used by https://github.com/w3c/web-platform-tests/blob/6ba01ea2ffbafbb329352628b244815654b38156/webusb/resources/usb-helpers.js#L128 to support their activation requirements.

If test driver is sufficiently well supported on all platforms we might as well use it instead of creating simulateUserActivation.

We will probably then want a helper class for tests to abstract away some of this code, but it won't need to be part of the API, just the tests.

Are there any platforms that don't support TestDriver WPTs?

https://github.com/w3c/web-platform-tests/blob/master/resources/testdriver.js

ryzngard commented 6 years ago

I thought the point of having a specific user activation was to bypass any consent dialogs? Switching to webdriver should be fine, but I'm not read up on how it handles consent dialogs.

offenwanger commented 6 years ago

This is a very good point.

Should we rename simulateUserActivation to encompass the fact that it might possibly be covering more than just the user activation?

Originally, the simulateUserActivation was meant to get past step 5 in https://immersive-web.github.io/webxr/#dom-xrdevice-requestsession. This is why I was thinking it would make more sense to use the already available click function.

However, step 10 in https://immersive-web.github.io/webxr/#initialize-the-session might also need some simulation in order pass it, or need some kind of bypass function, depending on what the platform specific steps are. As these steps are platform specific, we can't handle it cross platform, so we need something to be implemented per platform to handle that, and simulateUserActivation function or something similar makes sense.

ryzngard commented 6 years ago

I'm trying to grok exactly what you're saying here.

However, step 10 in https://immersive-web.github.io/webxr/#initialize-the-session might also need some simulation in order pass it.

I would assume that creation of a session must happen within the simulateUserActivation promise. With that context, each platform should be able to handle the logic outlined in https://immersive-web.github.io/webxr/#initialize-the-session

iecompattest commented 6 years ago

I'm trying to grok exactly what you're saying here.

offenwanger commented 6 years ago

Ok, so it sounds like it would be best to leave things as is.

alcooper91 commented 5 years ago

Given that there's been no activity on this for over a year, and the last comment was that we're okay to leave as is, I'm closing this out. Please re-open or file a new issue if you feel this should be re-addressed.