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

Unified Diff: third_party/WebKit/LayoutTests/sensor/gyroscope.html

Issue 2534703002: [Sensors] Layouts test to check frequency hint (Closed)
Patch Set: Comments from Reilly Created 4 years 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/gyroscope.html
diff --git a/third_party/WebKit/LayoutTests/sensor/gyroscope.html b/third_party/WebKit/LayoutTests/sensor/gyroscope.html
index 04e28a54fca83379e72e58ff027f5a4350770e4a..2d9150fe8aec9d1692e0c70482e9eb19d9636182 100644
--- a/third_party/WebKit/LayoutTests/sensor/gyroscope.html
+++ b/third_party/WebKit/LayoutTests/sensor/gyroscope.html
@@ -14,12 +14,17 @@ if (!window.testRunner)
const kDefaultReadingX = 1.12345;
const kDefaultReadingY = 2.12345;
const kDefaultReadingZ = 3.12345;
+var readsCount = 0;
-function update_sensor_reading(buffer) {
+function update_sensor_reading(buffer, expects_modified_reading) {
buffer[1] = window.performance.now();
buffer[2] = kDefaultReadingX;
buffer[3] = kDefaultReadingY;
buffer[4] = kDefaultReadingZ;
+ if (expects_modified_reading)
+ buffer[2] += readsCount;
+
+ readsCount++;
}
function verify_sensor_reading(reading) {

Powered by Google App Engine
This is Rietveld 408576698