Bug 1574320 [wpt PR 18471] - Check requested reference space against enabled XR session features, a=testonly
authorWill Cassella <cassew@google.com>
Mon, 26 Aug 2019 11:19:49 +0000
changeset 553861 d4a6ea3998b1f76f79fd674bb78a3fef8c9741f0
parent 553860 60dd077f7c232ecf56eb67ce88c97facf0052e0b
child 553862 10d1248b6fb839884be32d5853098ca837a45d25
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1574320, 18471, 985095, 1754275, 687912
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1574320 [wpt PR 18471] - Check requested reference space against enabled XR session features, a=testonly Automatic update from web-platform-tests Check requested reference space against enabled XR session features Currently we only check if the requested reference space is supported by the device before resolving the request. With more detailed consent this is no longer sufficient, we need to also check the underlying feature of the reference space against which features have been enabled. This CL also does some minor refactoring of code related to XRSessionFeature. Bug: 985095 Change-Id: Ibe6ecadbc6ce25c523eb4ee9d8a73560d8580df5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1754275 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Will Cassella <cassew@google.com> Cr-Commit-Position: refs/heads/master@{#687912} -- wpt-commits: ffc0fba7d4063f0fb063b9a215dd9ef7fedefebd wpt-pr: 18471
testing/web-platform/tests/webxr/events_referenceSpace_reset.https.html
testing/web-platform/tests/webxr/xrBoundedReferenceSpace_updates.https.html
testing/web-platform/tests/webxr/xrFrame_getPose.https.html
testing/web-platform/tests/webxr/xrFrame_lifetime.https.html
testing/web-platform/tests/webxr/xrReferenceSpace_originOffsetBounded.https.html
testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html
testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_timestamp.https.html
testing/web-platform/tests/webxr/xrStationaryReferenceSpace_floorlevel_updates.https.html
--- a/testing/web-platform/tests/webxr/events_referenceSpace_reset.https.html
+++ b/testing/web-platform/tests/webxr/events_referenceSpace_reset.https.html
@@ -45,11 +45,13 @@ let testFunction = function(session, fak
   session.requestAnimationFrame(() => {});
 
   return resetPromise;
 };
 
 xr_session_promise_test(
   immersiveTestName, testFunction, fakeDeviceInitParams, 'immersive-vr');
 xr_session_promise_test(
-  nonImmersiveTestName, testFunction, fakeDeviceInitParams, 'inline');
+  nonImmersiveTestName, testFunction, fakeDeviceInitParams, 'inline', {
+    requiredFeatures: ['local'],
+  });
 
 </script>
--- a/testing/web-platform/tests/webxr/xrBoundedReferenceSpace_updates.https.html
+++ b/testing/web-platform/tests/webxr/xrBoundedReferenceSpace_updates.https.html
@@ -53,11 +53,11 @@ let testFunction = function(session, fak
 
           // Now set the bounds explicitly and check again on the next frame.
           fakeDeviceController.setBoundsGeometry(VALID_BOUNDS);
           session.requestAnimationFrame(onFrame);
       });
     });
 };
 
-xr_session_promise_test(testName, testFunction, fakeDeviceInitParams, 'immersive-vr');
+xr_session_promise_test(testName, testFunction, fakeDeviceInitParams, 'immersive-vr', { 'requiredFeatures': ['bounded-floor'] });
 
 </script>
--- a/testing/web-platform/tests/webxr/xrFrame_getPose.https.html
+++ b/testing/web-platform/tests/webxr/xrFrame_getPose.https.html
@@ -72,11 +72,11 @@ let testFunction = function(session, fak
 
     session.requestAnimationFrame(onFrame);
   }));
 };
 
 xr_session_promise_test(immersiveTestName, testFunction,
   fakeDeviceInitParams, 'immersive-vr');
 xr_session_promise_test(nonImmersiveTestName, testFunction,
-  fakeDeviceInitParams, 'inline');
+  fakeDeviceInitParams, 'inline', { 'requiredFeatures': ['local'] });
 
 </script>
--- a/testing/web-platform/tests/webxr/xrFrame_lifetime.https.html
+++ b/testing/web-platform/tests/webxr/xrFrame_lifetime.https.html
@@ -47,12 +47,12 @@
           testSession.requestAnimationFrame(onFrame);
         });
       });
     });
 
     xr_session_promise_test(immersiveTestName, testFunction,
       fakeDeviceInitParams, 'immersive-vr');
     xr_session_promise_test(nonImmersiveTestName, testFunction,
-      fakeDeviceInitParams, 'inline');
+      fakeDeviceInitParams, 'inline', { 'requiredFeatures': ['local'] });
 
   </script>
 </body>
--- a/testing/web-platform/tests/webxr/xrReferenceSpace_originOffsetBounded.https.html
+++ b/testing/web-platform/tests/webxr/xrReferenceSpace_originOffsetBounded.https.html
@@ -234,11 +234,11 @@ function testFunction(session, fakeDevic
 
         resolve();
       });
     });
   });
 };
 
 xr_session_promise_test(
-  testName, testFunction, fakeDeviceInitParams, 'immersive-vr');
+  testName, testFunction, fakeDeviceInitParams, 'immersive-vr', { 'requiredFeatures': ['bounded-floor'] });
 
 </script>
--- a/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html
+++ b/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html
@@ -63,14 +63,14 @@
             counter++;
           }
 
           session.requestAnimationFrame(onFrame);
         }));
     };
 
     xr_session_promise_test(nonImmersiveTestName, testFunction,
-      fakeDeviceInitParams, 'inline');
+      fakeDeviceInitParams, 'inline', { 'requiredFeatures': ['local'] });
     xr_session_promise_test(immersiveTestName, testFunction,
       fakeDeviceInitParams, 'immersive-vr');
 
   </script>
 </body>
--- a/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_timestamp.https.html
+++ b/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_timestamp.https.html
@@ -10,17 +10,17 @@ const TEN_SECONDS = 10000; // 10k ms in 
 const ONE_MINUTE = 60000; // 60k ms in one minute
 
 let immersiveTestName = "XRFrame getViewerPose updates on the next frame for immersive";
 let nonImmersiveTestName = "XRFrame getViewerPose updates on the next frame for non-immersive";
 
 let fakeDeviceInitParams = TRACKED_IMMERSIVE_DEVICE;
 
 let testFunction = function(session, fakeDeviceController, t) {
-  return session.requestReferenceSpace('local')
+  return session.requestReferenceSpace('viewer')
     .then((referenceSpace) => new Promise((resolve, reject) => {
       let counter = 0;
       let windowFrameTime = 0;
       let frameTime = 0;
 
       function onFrameFirst(time, xrFrame) {
         frameTime = time;
         let now = performance.now();
--- a/testing/web-platform/tests/webxr/xrStationaryReferenceSpace_floorlevel_updates.https.html
+++ b/testing/web-platform/tests/webxr/xrStationaryReferenceSpace_floorlevel_updates.https.html
@@ -59,12 +59,12 @@ let testFunction = function(session, fak
       // Need to wait one frame for the removal to propagate before we check that
       // everything is at the expected emulated position.
       session.requestAnimationFrame(() => {
         session.requestAnimationFrame(onFirstFrame);
       });
     }));
 };
 
-xr_session_promise_test(immersiveTestName, testFunction, fakeDeviceInitParams, 'immersive-vr');
-xr_session_promise_test(nonImmersiveTestName, testFunction, fakeDeviceInitParams, 'inline');
+xr_session_promise_test(immersiveTestName, testFunction, fakeDeviceInitParams, 'immersive-vr', { 'requiredFeatures': ['local-floor'] });
+xr_session_promise_test(nonImmersiveTestName, testFunction, fakeDeviceInitParams, 'inline', { 'requiredFeatures': ['local-floor'] });
 
 </script>