<head>
<script src="../resources/js-test.js"></script>
<body>
<script>
description("Tests for vibrationActuator.type");
jsTestIsAsync = true;

function runTest() {
    addEventListener("gamepadconnected", e => {
        gamepad = e.gamepad;

        shouldBeEqualToString("gamepad.vibrationActuator.type", "dual-rumble");

        finishJSTest();
    });

    const supportsDualRumble = true;
    testRunner.setMockGamepadDetails(0, "Test Gamepad", "", 2, 2, supportsDualRumble);
    testRunner.setMockGamepadAxisValue(0, 0, 0.7);
    testRunner.setMockGamepadAxisValue(0, 1, -1.0);
    testRunner.setMockGamepadButtonValue(0, 0, 1.0);
    testRunner.setMockGamepadButtonValue(0, 1, 1.0);
    testRunner.connectMockGamepad(0);
}

onload = runTest;
</script>
</body>
