Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/vr/test/mochitest/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  test_vrController_displayId.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/dom/vr/test/mochitest/test_vrController_displayId.html


<!DOCTYPE html>
<html>
  <head>
    <title>VRController DisplayId</title>
    <meta name="timeout" content="long"/>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <script src="VRSimulationDriver.js"></script>
    <script src="runVRTest.js"></script>
  </head>
  <body>
    <script>
      "use strict";
      var vrDisplay;
      var controllerCount = 0;

      function addController() {
        promise_test((test) => {
          return VRSimulationDriver.AttachVRController().then((controller) => {
            controller.newButtonEvent(0, true);
          });
        }, "Finish to add VRController.");
      }

      function listenControllerEvents() {
        async_test(function(t) {
          window.addEventListener("gamepadbuttondown", function(e) {
              assert_equals(e.gamepad.displayId, vrDisplay.displayId, "gamepad.displayId should be equal to vrDisplay.");
              assert_equals(e.gamepad.id, "Puppet Gamepad""gamepad.id must be equal to 'Puppet Gamepad'.");
              ++controllerCount;
              if (controllerCount == 2) {
                t.done();
              }
          });
        }, "Finish to verify VRController.displayId.");
      }

      function startTest() {
        promise_test((test) => {
          listenControllerEvents();
          return VRSimulationDriver.AttachWebVRDisplay().then(() => {
            return navigator.getVRDisplays().then((displays) => {
              vrDisplay = displays[0];
              assert_equals(displays.length, 1, "displays.length must be one after attach.");
              assert_equals(vrDisplay.displayName, "Puppet HMD""display.displayName must be equal to 'Puppet HMD'.");
              addController();
              addController();
            });
          });
        }, "Finish to add VRDisplay.");
      }

      runVRTest(startTest);
    </script>
  </body>
</html>

Messung V0.5
C=87 H=93 G=89

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.