#include <algorithm>
#include "base/barrier_closure.h"
#include "base/functional/bind.h"
#include "base/functional/callback_forward.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/memory/shared_memory_mapping.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_future.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/device/device_service.h"
#include "services/device/device_service_test_base.h"
#include "services/device/generic_sensor/fake_platform_sensor_and_provider.h"
#include "services/device/generic_sensor/platform_sensor.h"
#include "services/device/generic_sensor/platform_sensor_provider.h"
#include "services/device/generic_sensor/sensor_provider_impl.h"
#include "services/device/generic_sensor/virtual_platform_sensor.h"
#include "services/device/generic_sensor/virtual_platform_sensor_provider.h"
#include "services/device/public/cpp/device_features.h"
#include "services/device/public/cpp/generic_sensor/platform_sensor_configuration.h"
#include "services/device/public/cpp/generic_sensor/sensor_reading.h"
#include "services/device/public/cpp/generic_sensor/sensor_reading_shared_buffer_reader.h"
#include "services/device/public/cpp/generic_sensor/sensor_traits.h"
_;
Invoke;
namespace device {
SensorType;
namespace {
constexpr double kMinimumPlatformFrequency = …;
constexpr double kMaximumPlatformFrequency = …;
class TestSensorClient : public mojom::SensorClient { … };
}
class GenericSensorServiceTest : public DeviceServiceTestBase { … };
TEST_F(GenericSensorServiceTest, GetSensorTest) { … }
TEST_F(GenericSensorServiceTest, GetDefaultConfigurationTest) { … }
TEST_F(GenericSensorServiceTest, ValidAddConfigurationTest) { … }
TEST_F(GenericSensorServiceTest, InvalidAddConfigurationTest) { … }
TEST_F(GenericSensorServiceTest, MultipleClientsTest) { … }
TEST_F(GenericSensorServiceTest, ClientMojoConnectionBrokenTest) { … }
TEST_F(GenericSensorServiceTest, AddAndRemoveConfigurationTest) { … }
TEST_F(GenericSensorServiceTest, SuspendTest) { … }
TEST_F(GenericSensorServiceTest, ErrorWhileSuspendedTest) { … }
TEST_F(GenericSensorServiceTest, SuspendThenResumeTest) { … }
TEST_F(GenericSensorServiceTest, MultipleClientsSuspendAndResumeTest) { … }
TEST_F(GenericSensorServiceTest, MojoReceiverDisconnectionTest) { … }
TEST_F(GenericSensorServiceTest,
DifferentVirtualAndNonVirtualPlatformSensorsTest) { … }
TEST_F(GenericSensorServiceTest, SameVirtualAndNonVirtualPlatformSensorsTest) { … }
TEST_F(GenericSensorServiceTest,
QuaternionSensorsOverrideEulerAngleSensorsTest) { … }
TEST_F(GenericSensorServiceTest, VirtualEulerAngleSensorCreationTest) { … }
TEST_F(GenericSensorServiceTest, VirtualPlatformOverridesNonVirtualTest) { … }
TEST_F(GenericSensorServiceTest, DoubleVirtualPlatformSensorCreationTest) { … }
TEST_F(GenericSensorServiceTest, GetNonOverriddenSensorTest) { … }
TEST_F(GenericSensorServiceTest, UpdateNonOverriddenSensorTest) { … }
}