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

Unified Diff: third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html

Issue 2353493002: [Sensors] Allow Sensor API only on secure top-level browsing contexts and add frequency checks (Closed)
Patch Set: Review comments Created 4 years, 3 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: third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
diff --git a/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html b/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
index 340cd572d7dd92bbefffaa5ebe5205e6dec141bf..ebec93d04af02f1c9282713db70c9cc376493f36 100644
--- a/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
+++ b/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
@@ -17,6 +17,11 @@ function update_sensor_reading(buffer) {
buffer[1] = kDefaultReadingValue;
}
+test(() => assert_throws(
+ new RangeError(),
+ () => new AmbientLightSensor({frequency: -60})),
timvolodine 2016/09/19 16:52:13 nit: also test for capping at 60?
Mikhail 2016/09/20 13:29:36 Done.
+ 'Test that negative frequency causes exception from constructor.');
+
sensor_test(sensor => {
let ambientLightSensor = new AmbientLightSensor({frequency: 60});
timvolodine 2016/09/19 16:52:13 just curious here: does the frequency here mean 'm
Mikhail 2016/09/20 13:29:36 that is more 'desired polling frequency', frequenc
timvolodine 2016/09/20 17:46:37 it's not exactly clear what 'desired polling frequ
Mikhail 2016/09/21 10:00:42 That is indeed being discussed in WG atm, however
ambientLightSensor.start();

Powered by Google App Engine
This is Rietveld 408576698