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

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: 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..4173ac60a9516ffad029ab76ef87d98261eb1fc7 100644
--- a/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
+++ b/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
@@ -17,6 +17,9 @@ function update_sensor_reading(buffer) {
buffer[1] = kDefaultReadingValue;
}
+test(() => assert_throws(new RangeError(), () => new AmbientLightSensor({frequency: -60})),
shalamov 2016/09/19 13:11:42 nit: Format to 80 columns?
Mikhail 2016/09/19 14:18:02 Done.
+ 'Test that negative frequency argument causes exception from constructor.');
+
sensor_test(sensor => {
let ambientLightSensor = new AmbientLightSensor({frequency: 60});
ambientLightSensor.start();

Powered by Google App Engine
This is Rietveld 408576698