summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/gamepad/mock_gamepad.js
blob: a246604242e5505be2aa4538a62b82b4246c84e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */

var GamepadService;

function runGamepadTest (callback) {
  SpecialPowers.pushPrefEnv({"set" : [["dom.gamepad.test.enabled", true]]},
                      () => {
                        GamepadService = navigator.requestGamepadServiceTest();
                        callback();
                      });
}