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

Side by Side Diff: third_party/WebKit/LayoutTests/sensor/gyroscope.html

Issue 2506903003: [sensors] Gyroscope sensor bindings implementation (Closed)
Patch Set: Comments + rebase Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/sensor/idl-Gyroscope.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script src="../resources/mojo-helpers.js"></script>
5 <script src="resources/sensor-helpers.js"></script>
6 <script src="resources/generic-sensor-tests.js"></script>
7 <script>
8
9 'use strict';
10
11 if (!window.testRunner)
12 debug('This test cannot be run without the TestRunner');
13
14 const kDefaultReadingX = 1.12345;
15 const kDefaultReadingY = 2.12345;
16 const kDefaultReadingZ = 3.12345;
17
18 function update_sensor_reading(buffer) {
19 buffer[1] = window.performance.now();
20 buffer[2] = kDefaultReadingX;
21 buffer[3] = kDefaultReadingY;
22 buffer[4] = kDefaultReadingZ;
23 }
24
25 function verify_sensor_reading(reading) {
26 return reading.x == kDefaultReadingX &&
27 reading.y == kDefaultReadingY &&
28 reading.z == kDefaultReadingZ;
29 }
30
31 runGenericSensorTests(Gyroscope, update_sensor_reading, verify_sensor_reading);
32
33 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/sensor/idl-Gyroscope.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698