Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix partial issues from #10198 #10962

Merged
merged 2 commits into from
Jun 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script>
"use strict";

run_fp_tests_disabled(AmbientLightSensor);
run_fp_tests_disabled('AmbientLightSensor');
</script>
</body>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script>
"use strict";

run_fp_tests_enabled_by_attribute_redirect_on_load(AmbientLightSensor);
run_fp_tests_enabled_by_attribute_redirect_on_load('AmbientLightSensor');
</script>
</body>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script>
"use strict";

run_fp_tests_enabled_by_attribute(AmbientLightSensor);
run_fp_tests_enabled_by_attribute('AmbientLightSensor');
</script>
</body>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script>
"use strict";

run_fp_tests_enabled(AmbientLightSensor);
run_fp_tests_enabled('AmbientLightSensor');
</script>
</body>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script>
"use strict";

run_fp_tests_enabled_on_self_origin(AmbientLightSensor);
run_fp_tests_enabled_on_self_origin('AmbientLightSensor');
</script>
</body>
2 changes: 1 addition & 1 deletion ambient-light/AmbientLightSensor.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<div id="log"></div>
<script>

runGenericSensorTests(AmbientLightSensor);
runGenericSensorTests('AmbientLightSensor');

</script>
2 changes: 1 addition & 1 deletion ambient-light/AmbientLightSensor_onerror-manual.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ <h2>Precondition</h2>
</ol>
<script>

runGenericSensorOnerror(AmbientLightSensor);
runGenericSensorOnerror('AmbientLightSensor');

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script>
"use strict";

run_fp_tests_disabled(GeolocationSensor);
run_fp_tests_disabled('GeolocationSensor');

promise_test(async t => {
await promise_rejects(t, 'SecurityError', GeolocationSensor.read());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script>
"use strict";

run_fp_tests_enabled_by_attribute_redirect_on_load(GeolocationSensor);
run_fp_tests_enabled_by_attribute_redirect_on_load('GeolocationSensor');
</script>
</body>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script>
"use strict";

run_fp_tests_enabled_by_attribute(GeolocationSensor);
run_fp_tests_enabled_by_attribute('GeolocationSensor');
</script>
</body>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script>
"use strict";

run_fp_tests_enabled(GeolocationSensor);
run_fp_tests_enabled('GeolocationSensor');
</script>
</body>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script>
"use strict";

run_fp_tests_enabled_on_self_origin(GeolocationSensor);
run_fp_tests_enabled_on_self_origin('GeolocationSensor');
</script>
</body>
2 changes: 1 addition & 1 deletion geolocation-sensor/GeolocationSensor.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<script src="/generic-sensor/generic-sensor-tests.js"></script>
<script>

runGenericSensorTests(GeolocationSensor);
runGenericSensorTests('GeolocationSensor');

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ <h2>Precondition</h2>
</ol>
<script>

runGenericSensorOnerror(GeolocationSensor);
runGenericSensorOnerror('GeolocationSensor');

</script>
2 changes: 1 addition & 1 deletion proximity/ProximitySensor.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<div id="log"></div>
<script>

runGenericSensorTests(ProximitySensor);
runGenericSensorTests('ProximitySensor');

</script>
2 changes: 1 addition & 1 deletion proximity/ProximitySensor_onerror-manual.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ <h2>Precondition</h2>
</ol>
<script>

runGenericSensorOnerror(ProximitySensor);
runGenericSensorOnerror('ProximitySensor');

</script>
6 changes: 3 additions & 3 deletions resources/chromium/generic_sensor_mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ var GenericSensorTest = (() => {
if (testInternal.initialized)
throw new Error('Call reset() before initialize().');

if (testRunner) { // Grant sensor permissions for Chromium testrunner.
if (window.testRunner) { // Grant sensor permissions for Chromium testrunner.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if this sounds dumb, but isn't testRunner the same as window.testRunner here? Or do the Mojo JS files behave differently?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This testRunner is specific for Chromium testrunner, not sure if it is still useful in LayoutTests/external/wpt, but for sure, it is undefined in w-p-t runnner.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. tests will fail with Uncaught ReferenceError: testRunner is not defined

['accelerometer', 'gyroscope',
'magnetometer', 'ambient-light-sensor'].forEach((entry) => {
testRunner.setPermission(entry, 'granted',
location.origin, location.origin);
window.testRunner.setPermission(entry, 'granted',
location.origin, location.origin);
});
}

Expand Down