Skip to content

Commit 7cbefa7

Browse files
Honryfoolip
authored andcommittedJun 14, 2018
- `if (testRunner)` should be `if (window.testRunner)` - Use String to pass sensor object param to avoid undefined error

17 files changed

+19
-19
lines changed
 

‎ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_disabled(AmbientLightSensor);
11+
run_fp_tests_disabled('AmbientLightSensor');
1212
</script>
1313
</body>

‎ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_enabled_by_attribute_redirect_on_load(AmbientLightSensor);
11+
run_fp_tests_enabled_by_attribute_redirect_on_load('AmbientLightSensor');
1212
</script>
1313
</body>

‎ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_enabled_by_attribute(AmbientLightSensor);
11+
run_fp_tests_enabled_by_attribute('AmbientLightSensor');
1212
</script>
1313
</body>

‎ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_enabled(AmbientLightSensor);
11+
run_fp_tests_enabled('AmbientLightSensor');
1212
</script>
1313
</body>

‎ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_enabled_on_self_origin(AmbientLightSensor);
11+
run_fp_tests_enabled_on_self_origin('AmbientLightSensor');
1212
</script>
1313
</body>

‎ambient-light/AmbientLightSensor.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<div id="log"></div>
1010
<script>
1111

12-
runGenericSensorTests(AmbientLightSensor);
12+
runGenericSensorTests('AmbientLightSensor');
1313

1414
</script>

‎ambient-light/AmbientLightSensor_onerror-manual.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ <h2>Precondition</h2>
1515
</ol>
1616
<script>
1717

18-
runGenericSensorOnerror(AmbientLightSensor);
18+
runGenericSensorOnerror('AmbientLightSensor');
1919

2020
</script>

‎geolocation-sensor/GeolocationSensor-disabled-by-feature-policy.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_disabled(GeolocationSensor);
11+
run_fp_tests_disabled('GeolocationSensor');
1212

1313
promise_test(async t => {
1414
await promise_rejects(t, 'SecurityError', GeolocationSensor.read());

‎geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_enabled_by_attribute_redirect_on_load(GeolocationSensor);
11+
run_fp_tests_enabled_by_attribute_redirect_on_load('GeolocationSensor');
1212
</script>
1313
</body>

‎geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_enabled_by_attribute(GeolocationSensor);
11+
run_fp_tests_enabled_by_attribute('GeolocationSensor');
1212
</script>
1313
</body>

‎geolocation-sensor/GeolocationSensor-enabled-by-feature-policy.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_enabled(GeolocationSensor);
11+
run_fp_tests_enabled('GeolocationSensor');
1212
</script>
1313
</body>

‎geolocation-sensor/GeolocationSensor-enabled-on-self-origin-by-feature-policy.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script>
99
"use strict";
1010

11-
run_fp_tests_enabled_on_self_origin(GeolocationSensor);
11+
run_fp_tests_enabled_on_self_origin('GeolocationSensor');
1212
</script>
1313
</body>

‎geolocation-sensor/GeolocationSensor.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<script src="/generic-sensor/generic-sensor-tests.js"></script>
99
<script>
1010

11-
runGenericSensorTests(GeolocationSensor);
11+
runGenericSensorTests('GeolocationSensor');
1212

1313
</script>

‎geolocation-sensor/GeolocationSensor_onerror-manual.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ <h2>Precondition</h2>
1414
</ol>
1515
<script>
1616

17-
runGenericSensorOnerror(GeolocationSensor);
17+
runGenericSensorOnerror('GeolocationSensor');
1818

1919
</script>

‎proximity/ProximitySensor.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<div id="log"></div>
1010
<script>
1111

12-
runGenericSensorTests(ProximitySensor);
12+
runGenericSensorTests('ProximitySensor');
1313

1414
</script>

‎proximity/ProximitySensor_onerror-manual.https.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ <h2>Precondition</h2>
1515
</ol>
1616
<script>
1717

18-
runGenericSensorOnerror(ProximitySensor);
18+
runGenericSensorOnerror('ProximitySensor');
1919

2020
</script>

‎resources/chromium/generic_sensor_mocks.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,11 @@ var GenericSensorTest = (() => {
201201
if (testInternal.initialized)
202202
throw new Error('Call reset() before initialize().');
203203

204-
if (testRunner) { // Grant sensor permissions for Chromium testrunner.
204+
if (window.testRunner) { // Grant sensor permissions for Chromium testrunner.
205205
['accelerometer', 'gyroscope',
206206
'magnetometer', 'ambient-light-sensor'].forEach((entry) => {
207-
testRunner.setPermission(entry, 'granted',
208-
location.origin, location.origin);
207+
window.testRunner.setPermission(entry, 'granted',
208+
location.origin, location.origin);
209209
});
210210
}
211211

0 commit comments

Comments
 (0)
Please sign in to comment.