Skip to content

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
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

2 participants