#include "device/gamepad/xbox_hid_controller.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "device/gamepad/hid_writer.h"
#include "device/gamepad/public/mojom/gamepad.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
constexpr size_t kReportLength = …;
constexpr uint8_t kStopVibration[] = …;
static_assert …;
constexpr uint8_t kStartVibration[] = …;
static_assert …;
constexpr double kDurationMillis = …;
constexpr double kZeroStartDelayMillis = …;
constexpr double kStrongMagnitude = …;
constexpr double kWeakMagnitude = …;
constexpr double kLeftTrigger = …;
constexpr double kRightTrigger = …;
constexpr base::TimeDelta kPendingTaskDuration = …;
class FakeHidWriter : public HidWriter { … };
class XboxHidControllerTest : public testing::Test { … };
TEST_F(XboxHidControllerTest, PlayEffect) { … }
TEST_F(XboxHidControllerTest, ResetVibration) { … }
}
}