Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2044)

Unified Diff: device/generic_sensor/platform_sensor_provider.h

Issue 2434563005: [sensors] Add a browser test to sanity check ambient light sensor. (Closed)
Patch Set: Nit Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/platform_sensor_provider.h
diff --git a/device/generic_sensor/platform_sensor_provider.h b/device/generic_sensor/platform_sensor_provider.h
index ea6d3f5dae769a7a988f1bc9e543229cbdf8cce0..69007346891ebc3f22af80010fecaa167d09b9a8 100644
--- a/device/generic_sensor/platform_sensor_provider.h
+++ b/device/generic_sensor/platform_sensor_provider.h
@@ -20,6 +20,11 @@ class DEVICE_GENERIC_SENSOR_EXPORT PlatformSensorProvider
// the current platform.
static PlatformSensorProvider* GetInstance();
+ // This method allows to set a provider for testing and therefore
+ // skip the default platform provider. This allows testing without
+ // relying on the platform provider.
+ static void SetProviderForTesting(PlatformSensorProvider* provider);
+
protected:
PlatformSensorProvider() = default;
~PlatformSensorProvider() override = default;

Powered by Google App Engine
This is Rietveld 408576698