-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrun-tests.html
57 lines (49 loc) · 1.38 KB
/
run-tests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<title>Generic Sensor API polyfills tests</title>
<script src="tests/testharness.js"></script>
<script src="tests/testharnessreport.js"></script>
<script src="tests/geolocation-tests.js"></script>
<script src="tests/EventTarget-tests.js"></script>
<script src="tests/generic-sensor-tests.js"></script>
<meta name="timeout" content="long">
<script type="module">
import {
AbsoluteOrientationSensor,
RelativeOrientationSensor,
Gyroscope,
Accelerometer,
LinearAccelerationSensor,
GravitySensor
} from './src/motion-sensors.js';
import {
GeolocationSensor
} from './src/geolocation-sensor.js';
import {
EventTarget,
EventTargetMixin
} from './src/sensor.js';
runEventTarget_constructible(EventTarget);
runEventTarget_addEventListener(EventTarget);
runEventTarget_removeEventListener(EventTarget);
class TestB extends EventTargetMixin(HTMLElement) {
constructor(...args) {
super(...args);
console.log(this);
}
}
runGeolocationSensorTests(GeolocationSensor);
runGenericSensorTests(GeolocationSensor);
runEventTarget_dispatchEvent(TestB);
runGenericSensorTests(RelativeOrientationSensor);
runGenericSensorTests(AbsoluteOrientationSensor);
runGenericSensorTests(Gyroscope);
runGenericSensorTests(Accelerometer);
runGenericSensorTests(LinearAccelerationSensor);
runGenericSensorTests(GravitySensor);
</script>
<body>
<div id="console"></div>
</body>
</html>