Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webxr unit tests #5227

Merged
merged 3 commits into from
Feb 6, 2023
Merged

Conversation

diarmidmackenzie
Copy link
Contributor

@diarmidmackenzie diarmidmackenzie commented Feb 1, 2023

Description:

As noted in #5217, and one reason that bug #5221 slipped through - the Enter / Exit VR tests for a-scene are still entirely focussed on WebVR rather than WebXR.

This PR adds some tests for WebXR

Changes proposed:

I approached this as follows;

  • Duplicate the existing WebVR tests
  • Add additional stubbing code etc. to make them work
  • Remove the tests that seem not to be relevant (some tests depend on events like vrdisplaypointerrestricted and vrdisplaypresentchange that seem to be WebVR only).

I doubt this gives us perfect coverage of WebXR, but it should give good coverage of a broad range of key scenarios around entry to / exit from VR.

I have also confirmed that this set of tests would have caught the bug fixed under #5221.

Some very minor changes to a-scene also made, to allow simulation of WebXR availability via the el.hasWebXR flag.

@diarmidmackenzie diarmidmackenzie marked this pull request as ready for review February 1, 2023 20:47
@@ -37,9 +37,13 @@ setup(function () {
getDevice: function () { return {requestPresent: function () {}}; },
isPresenting: function () { return true; },
setDevice: function () {},
setSession: function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can do one liner

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@dmarcos
Copy link
Member

dmarcos commented Feb 6, 2023

Thank you very much!

@dmarcos dmarcos merged commit d49ddaa into aframevr:master Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants