Commit 19fc96d4 authored by Arnaud Mandy's avatar Arnaud Mandy Committed by Commit Bot

wpt: sensors: use of assert_implements

Taking in use new testharness.js API assert_implements instead of
assert_true.

Bug: 1119345
Change-Id: I4155d90968952e7bfa63a0c8755ba3c79e3145c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2364494Reviewed-by: default avatarRaphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com>
Cr-Commit-Position: refs/heads/master@{#800075}
parent a3b50b40
......@@ -5,8 +5,8 @@ PASS Accelerometer: Feature-Policy header accelerometer 'none' disallows cross-o
PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'none' disallows the top-level document.
PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'none' disallows same-origin iframes.
PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'none' disallows cross-origin iframes.
FAIL GravitySensor: Feature-Policy header accelerometer 'none' disallows the top-level document. assert_true: expected true got false
FAIL GravitySensor: Feature-Policy header accelerometer 'none' disallows same-origin iframes. assert_true: expected true got false
FAIL GravitySensor: Feature-Policy header accelerometer 'none' disallows cross-origin iframes. assert_true: expected true got false
FAIL GravitySensor: Feature-Policy header accelerometer 'none' disallows the top-level document. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Feature-Policy header accelerometer 'none' disallows same-origin iframes. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Feature-Policy header accelerometer 'none' disallows cross-origin iframes. assert_implements: GravitySensor is not supported. undefined
Harness: the test ran to completion.
......@@ -3,7 +3,7 @@ PASS Accelerometer: Feature-Policy allow='accelerometer' attribute allows same-o
PASS Accelerometer: Feature-Policy allow='accelerometer' attribute disallows cross-origin relocation
PASS LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute allows same-origin relocation
PASS LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute disallows cross-origin relocation
FAIL GravitySensor: Feature-Policy allow='accelerometer' attribute allows same-origin relocation assert_true: expected true got false
FAIL GravitySensor: Feature-Policy allow='accelerometer' attribute disallows cross-origin relocation assert_true: expected true got false
FAIL GravitySensor: Feature-Policy allow='accelerometer' attribute allows same-origin relocation assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Feature-Policy allow='accelerometer' attribute disallows cross-origin relocation assert_implements: GravitySensor is not supported. undefined
Harness: the test ran to completion.
......@@ -3,7 +3,7 @@ PASS Accelerometer: Feature-Policy allow='accelerometer' attribute allows same-o
PASS Accelerometer: Feature-Policy allow='accelerometer' attribute allows cross-origin iframe
PASS LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute allows same-origin iframe
PASS LinearAccelerationSensor: Feature-Policy allow='accelerometer' attribute allows cross-origin iframe
FAIL GravitySensor: Feature-Policy allow='accelerometer' attribute allows same-origin iframe assert_true: expected true got false
FAIL GravitySensor: Feature-Policy allow='accelerometer' attribute allows cross-origin iframe assert_true: expected true got false
FAIL GravitySensor: Feature-Policy allow='accelerometer' attribute allows same-origin iframe assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Feature-Policy allow='accelerometer' attribute allows cross-origin iframe assert_implements: GravitySensor is not supported. undefined
Harness: the test ran to completion.
......@@ -5,8 +5,8 @@ PASS Accelerometer: Feature-Policy header accelerometer * allows cross-origin if
PASS LinearAccelerationSensor: Feature-Policy header accelerometer * allows the top-level document.
PASS LinearAccelerationSensor: Feature-Policy header accelerometer * allows same-origin iframes.
PASS LinearAccelerationSensor: Feature-Policy header accelerometer * allows cross-origin iframes.
FAIL GravitySensor: Feature-Policy header accelerometer * allows the top-level document. assert_true: expected true got false
FAIL GravitySensor: Feature-Policy header accelerometer * allows same-origin iframes. assert_true: expected true got false
FAIL GravitySensor: Feature-Policy header accelerometer * allows cross-origin iframes. assert_true: expected true got false
FAIL GravitySensor: Feature-Policy header accelerometer * allows the top-level document. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Feature-Policy header accelerometer * allows same-origin iframes. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Feature-Policy header accelerometer * allows cross-origin iframes. assert_implements: GravitySensor is not supported. undefined
Harness: the test ran to completion.
......@@ -5,8 +5,8 @@ PASS Accelerometer: Feature-Policy header accelerometer 'self' disallows cross-o
PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'self' allows the top-level document.
PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'self' allows same-origin iframes.
PASS LinearAccelerationSensor: Feature-Policy header accelerometer 'self' disallows cross-origin iframes.
FAIL GravitySensor: Feature-Policy header accelerometer 'self' allows the top-level document. assert_true: expected true got false
FAIL GravitySensor: Feature-Policy header accelerometer 'self' allows same-origin iframes. assert_true: expected true got false
FAIL GravitySensor: Feature-Policy header accelerometer 'self' disallows cross-origin iframes. assert_true: expected true got false
FAIL GravitySensor: Feature-Policy header accelerometer 'self' allows the top-level document. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Feature-Policy header accelerometer 'self' allows same-origin iframes. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Feature-Policy header accelerometer 'self' disallows cross-origin iframes. assert_implements: GravitySensor is not supported. undefined
Harness: the test ran to completion.
......@@ -5,8 +5,8 @@ PASS Accelerometer: losing a document's frame with an active sensor does not cra
PASS LinearAccelerationSensor: sensor is suspended and resumed when focus traverses from to cross-origin frame
PASS LinearAccelerationSensor: sensor is not suspended when focus traverses from to same-origin frame
PASS LinearAccelerationSensor: losing a document's frame with an active sensor does not crash
FAIL GravitySensor: sensor is suspended and resumed when focus traverses from to cross-origin frame assert_true: expected true got false
FAIL GravitySensor: sensor is not suspended when focus traverses from to same-origin frame assert_true: expected true got false
FAIL GravitySensor: losing a document's frame with an active sensor does not crash assert_true: expected true got false
FAIL GravitySensor: sensor is suspended and resumed when focus traverses from to cross-origin frame assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: sensor is not suspended when focus traverses from to same-origin frame assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: losing a document's frame with an active sensor does not crash assert_implements: GravitySensor is not supported. undefined
Harness: the test ran to completion.
......@@ -21,27 +21,27 @@ PASS Accelerometer: frequency hint works.
PASS Accelerometer: throw 'TypeError' if frequency is invalid.
PASS Accelerometer: sensor reading is correct when options.referenceFrame is 'screen'.
PASS Accelerometer: throw 'TypeError' if referenceFrame is not one of enumeration values.
FAIL GravitySensor: Test that onerror is sent when sensor is not supported. assert_true: expected true got false
FAIL GravitySensor: Test that onerror is sent when permissions are not granted. assert_true: expected true got false
FAIL GravitySensor: Test that onerror is send when start() call has failed. assert_true: expected true got false
FAIL GravitySensor: Test that frequency is capped to allowed maximum. assert_true: expected true got false
FAIL GravitySensor: Test that frequency is capped to the maximum supported frequency. assert_true: expected true got false
FAIL GravitySensor: Test that frequency is limited to the minimum supported frequency. assert_true: expected true got false
FAIL GravitySensor: Test that sensor cannot be constructed within iframe disallowed to use feature policy. assert_true: expected true got false
FAIL GravitySensor: Test that sensor can be constructed within an iframe allowed to use feature policy. assert_true: expected true got false
FAIL GravitySensor: Test that 'onreading' is called and sensor reading is valid. assert_true: expected true got false
FAIL GravitySensor: sensor reading is correct. assert_true: expected true got false
FAIL GravitySensor: sensor timestamp is updated when time passes. assert_true: expected true got false
FAIL GravitySensor: Test that sensor can be successfully created and its states are correct. assert_true: expected true got false
FAIL GravitySensor: sensor.start() returns undefined. assert_true: expected true got false
FAIL GravitySensor: no exception is thrown when calling start() on already started sensor. assert_true: expected true got false
FAIL GravitySensor: sensor.stop() returns undefined. assert_true: expected true got false
FAIL GravitySensor: no exception is thrown when calling stop() on already stopped sensor. assert_true: expected true got false
FAIL GravitySensor: Test that fresh reading is fetched on start(). assert_true: expected true got false
FAIL GravitySensor: frequency hint works. assert_true: expected true got false
FAIL GravitySensor: throw 'TypeError' if frequency is invalid. assert_true: expected true got false
FAIL GravitySensor: sensor reading is correct when options.referenceFrame is 'screen'. assert_true: expected true got false
FAIL GravitySensor: throw 'TypeError' if referenceFrame is not one of enumeration values. assert_true: expected true got false
FAIL GravitySensor: Test that onerror is sent when sensor is not supported. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that onerror is sent when permissions are not granted. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that onerror is send when start() call has failed. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that frequency is capped to allowed maximum. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that frequency is capped to the maximum supported frequency. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that frequency is limited to the minimum supported frequency. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that sensor cannot be constructed within iframe disallowed to use feature policy. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that sensor can be constructed within an iframe allowed to use feature policy. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that 'onreading' is called and sensor reading is valid. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: sensor reading is correct. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: sensor timestamp is updated when time passes. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that sensor can be successfully created and its states are correct. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: sensor.start() returns undefined. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: no exception is thrown when calling start() on already started sensor. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: sensor.stop() returns undefined. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: no exception is thrown when calling stop() on already stopped sensor. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: Test that fresh reading is fetched on start(). assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: frequency hint works. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: throw 'TypeError' if frequency is invalid. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: sensor reading is correct when options.referenceFrame is 'screen'. assert_implements: GravitySensor is not supported. undefined
FAIL GravitySensor: throw 'TypeError' if referenceFrame is not one of enumeration values. assert_implements: GravitySensor is not supported. undefined
PASS LinearAccelerationSensor: Test that onerror is sent when sensor is not supported.
PASS LinearAccelerationSensor: Test that onerror is sent when permissions are not granted.
PASS LinearAccelerationSensor: Test that onerror is send when start() call has failed.
......
......@@ -28,12 +28,12 @@ function run_fp_tests_disabled(sensorName) {
const desc = "'new " + sensorName + "()'";
test(() => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
assert_throws_dom("SecurityError", () => {new sensorType()});
}, `${sensorName}: ${header} disallows the top-level document.`);
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......@@ -43,7 +43,7 @@ function run_fp_tests_disabled(sensorName) {
}, `${sensorName}: ${header} disallows same-origin iframes.`);
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......@@ -59,11 +59,11 @@ function run_fp_tests_enabled(sensorName) {
const desc = "'new " + sensorName + "()'";
test(() => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
}, `${sensorName}: ${header} allows the top-level document.`);
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......@@ -73,7 +73,7 @@ function run_fp_tests_enabled(sensorName) {
}, `${sensorName}: ${header} allows same-origin iframes.`);
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......@@ -89,7 +89,7 @@ function run_fp_tests_enabled_by_attribute(sensorName) {
const desc = "'new " + sensorName + "()'";
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......@@ -100,7 +100,7 @@ function run_fp_tests_enabled_by_attribute(sensorName) {
}, `${sensorName}: ${header} allows same-origin iframe`);
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......@@ -117,7 +117,7 @@ function run_fp_tests_enabled_by_attribute_redirect_on_load(sensorName) {
const desc = "'new " + sensorName + "()'";
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......@@ -128,7 +128,7 @@ function run_fp_tests_enabled_by_attribute_redirect_on_load(sensorName) {
}, `${sensorName}: ${header} allows same-origin relocation`);
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......@@ -145,11 +145,11 @@ function run_fp_tests_enabled_on_self_origin(sensorName) {
const desc = "'new " + sensorName + "()'";
test(() => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
}, `${sensorName}: ${header} allows the top-level document.`);
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......@@ -159,7 +159,7 @@ function run_fp_tests_enabled_on_self_origin(sensorName) {
}, `${sensorName}: ${header} allows same-origin iframes.`);
async_test(t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
......
......@@ -24,7 +24,7 @@ function run_generic_sensor_iframe_tests(sensorName) {
const featurePolicies = get_feature_policies_for_sensor(sensorName);
sensor_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const iframe = document.createElement('iframe');
iframe.allow = featurePolicies.join(';') + ';';
iframe.src = 'https://{{domains[www1]}}:{{ports[https][0]}}/generic-sensor/resources/iframe_sensor_handler.html';
......@@ -67,7 +67,7 @@ function run_generic_sensor_iframe_tests(sensorName) {
to cross-origin frame`);
sensor_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const iframe = document.createElement('iframe');
iframe.allow = featurePolicies.join(';') + ';';
iframe.src = 'https://{{host}}:{{ports[https][0]}}/generic-sensor/resources/iframe_sensor_handler.html';
......@@ -131,7 +131,7 @@ function run_generic_sensor_iframe_tests(sensorName) {
to same-origin frame`);
sensor_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const iframe = document.createElement('iframe');
iframe.allow = featurePolicies.join(';') + ';';
iframe.src = 'https://{{host}}:{{ports[https][0]}}/generic-sensor/resources/iframe_sensor_handler.html';
......
......@@ -51,7 +51,7 @@ function runGenericSensorTests(sensorName,
}
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
sensorProvider.setGetSensorShouldFail(sensorName, true);
const sensor = new sensorType;
const sensorWatcher = new EventWatcher(t, sensor, ["reading", "error"]);
......@@ -64,7 +64,7 @@ function runGenericSensorTests(sensorName,
}, `${sensorName}: Test that onerror is sent when sensor is not supported.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
sensorProvider.setPermissionsDenied(sensorName, true);
const sensor = new sensorType;
const sensorWatcher = new EventWatcher(t, sensor, ["reading", "error"]);
......@@ -78,7 +78,7 @@ function runGenericSensorTests(sensorName,
granted.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType({frequency: 560});
const sensorWatcher = new EventWatcher(t, sensor, ["reading", "error"]);
sensor.start();
......@@ -93,7 +93,7 @@ function runGenericSensorTests(sensorName,
}, `${sensorName}: Test that onerror is send when start() call has failed.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType({frequency: 560});
const sensorWatcher = new EventWatcher(t, sensor, ["activate", "error"]);
sensor.start();
......@@ -108,7 +108,7 @@ function runGenericSensorTests(sensorName,
}, `${sensorName}: Test that frequency is capped to allowed maximum.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const maxSupportedFrequency = 5;
sensorProvider.setMaximumSupportedFrequency(maxSupportedFrequency);
const sensor = new sensorType({frequency: 50});
......@@ -126,7 +126,7 @@ function runGenericSensorTests(sensorName,
frequency.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const minSupportedFrequency = 2;
sensorProvider.setMinimumSupportedFrequency(minSupportedFrequency);
const sensor = new sensorType({frequency: -1});
......@@ -144,7 +144,7 @@ function runGenericSensorTests(sensorName,
frequency.`);
promise_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const iframe = document.createElement('iframe');
iframe.allow = featurePolicies.join(' \'none\'; ') + ' \'none\';';
iframe.srcdoc = '<script>' +
......@@ -171,7 +171,7 @@ function runGenericSensorTests(sensorName,
disallowed to use feature policy.`);
promise_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const iframe = document.createElement('iframe');
iframe.allow = featurePolicies.join(';') + ';';
iframe.srcdoc = '<script>' +
......@@ -198,7 +198,7 @@ function runGenericSensorTests(sensorName,
allowed to use feature policy.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType();
const sensorWatcher = new EventWatcher(t, sensor, ["reading", "error"]);
sensor.start();
......@@ -219,7 +219,7 @@ function runGenericSensorTests(sensorName,
valid.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor1 = new sensorType();
const sensorWatcher1 = new EventWatcher(t, sensor1, ["reading", "error"]);
sensor1.start();
......@@ -249,7 +249,7 @@ function runGenericSensorTests(sensorName,
}, `${sensorName}: sensor reading is correct.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType();
const sensorWatcher = new EventWatcher(t, sensor, ["reading", "error"]);
sensor.start();
......@@ -268,7 +268,7 @@ function runGenericSensorTests(sensorName,
}, `${sensorName}: sensor timestamp is updated when time passes.`);
sensor_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType();
const sensorWatcher = new EventWatcher(t, sensor, ["activate", "error"]);
assert_false(sensor.activated);
......@@ -284,7 +284,7 @@ function runGenericSensorTests(sensorName,
states are correct.`);
sensor_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType();
const sensorWatcher = new EventWatcher(t, sensor, ["activate", "error"]);
const start_return = sensor.start();
......@@ -295,7 +295,7 @@ function runGenericSensorTests(sensorName,
}, `${sensorName}: sensor.start() returns undefined.`);
sensor_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType();
const sensorWatcher = new EventWatcher(t, sensor, ["activate", "error"]);
sensor.start();
......@@ -308,7 +308,7 @@ function runGenericSensorTests(sensorName,
started sensor.`);
sensor_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType();
const sensorWatcher = new EventWatcher(t, sensor, ["activate", "error"]);
sensor.start();
......@@ -319,7 +319,7 @@ function runGenericSensorTests(sensorName,
}, `${sensorName}: sensor.stop() returns undefined.`);
sensor_test(async t => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType();
const sensorWatcher = new EventWatcher(t, sensor, ["activate", "error"]);
sensor.start();
......@@ -332,7 +332,7 @@ function runGenericSensorTests(sensorName,
stopped sensor.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor = new sensorType();
const sensorWatcher = new EventWatcher(t, sensor, ["reading", "error"]);
sensor.start();
......@@ -367,7 +367,7 @@ function runGenericSensorTests(sensorName,
// TBD file a WPT issue: visibilityChangeWatcher times out.
// sensor_test(async (t, sensorProvider) => {
// assert_true(sensorName in self);
// assert_implements(sensorName in self, `${sensorName} is not supported.`);
// const sensor = new sensorType();
// const sensorWatcher = new EventWatcher(t, sensor, ["reading", "error"]);
// const visibilityChangeWatcher = new EventWatcher(t, document,
......@@ -392,7 +392,7 @@ function runGenericSensorTests(sensorName,
// }, `${sensorName}: sensor readings can not be fired on the background tab.`);
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const fastSensor = new sensorType({frequency: 60});
fastSensor.start();
......@@ -450,7 +450,7 @@ function runGenericSensorTests(sensorName,
// option.`);
test(() => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const invalidFreqs = [
"invalid",
NaN,
......@@ -471,7 +471,7 @@ function runGenericSensorTests(sensorName,
}
sensor_test(async (t, sensorProvider) => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const sensor1 = new sensorType({frequency: 60});
const sensor2 = new sensorType({frequency: 60, referenceFrame: "screen"});
const sensorWatcher1 = new EventWatcher(t, sensor1, ["reading", "error"]);
......@@ -503,7 +503,7 @@ function runGenericSensorTests(sensorName,
is 'screen'.`);
test(() => {
assert_true(sensorName in self);
assert_implements(sensorName in self, `${sensorName} is not supported.`);
const invalidRefFrames = [
"invalid",
null,
......
This is a testharness.js-based test.
FAIL GeolocationSensor: Feature-Policy header geolocation 'none' disallows the top-level document. assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy header geolocation 'none' disallows same-origin iframes. assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy header geolocation 'none' disallows cross-origin iframes. assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy header geolocation 'none' disallows the top-level document. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Feature-Policy header geolocation 'none' disallows same-origin iframes. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Feature-Policy header geolocation 'none' disallows cross-origin iframes. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor.read(): 'SecurityError' is thrown when disabled by Feature Policy promise_test: Unhandled rejection with value: object "ReferenceError: GeolocationSensor is not defined"
FAIL GeolocationSensor.read(): 'AbortError' takes priority promise_test: Unhandled rejection with value: object "ReferenceError: GeolocationSensor is not defined"
Harness: the test ran to completion.
......
This is a testharness.js-based test.
FAIL GeolocationSensor: Feature-Policy allow='geolocation' attribute allows same-origin relocation assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy allow='geolocation' attribute disallows cross-origin relocation assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy allow='geolocation' attribute allows same-origin relocation assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Feature-Policy allow='geolocation' attribute disallows cross-origin relocation assert_implements: GeolocationSensor is not supported. undefined
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL GeolocationSensor: Feature-Policy allow='geolocation' attribute allows same-origin iframe assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy allow='geolocation' attribute allows cross-origin iframe assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy allow='geolocation' attribute allows same-origin iframe assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Feature-Policy allow='geolocation' attribute allows cross-origin iframe assert_implements: GeolocationSensor is not supported. undefined
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL GeolocationSensor: Feature-Policy header geolocation * allows the top-level document. assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy header geolocation * allows same-origin iframes. assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy header geolocation * allows cross-origin iframes. assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy header geolocation * allows the top-level document. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Feature-Policy header geolocation * allows same-origin iframes. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Feature-Policy header geolocation * allows cross-origin iframes. assert_implements: GeolocationSensor is not supported. undefined
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL GeolocationSensor: Feature-Policy header geolocation 'self' allows the top-level document. assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy header geolocation 'self' allows same-origin iframes. assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy header geolocation 'self' disallows cross-origin iframes. assert_true: expected true got false
FAIL GeolocationSensor: Feature-Policy header geolocation 'self' allows the top-level document. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Feature-Policy header geolocation 'self' allows same-origin iframes. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Feature-Policy header geolocation 'self' disallows cross-origin iframes. assert_implements: GeolocationSensor is not supported. undefined
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL GeolocationSensor: sensor is suspended and resumed when focus traverses from to cross-origin frame assert_true: expected true got false
FAIL GeolocationSensor: sensor is not suspended when focus traverses from to same-origin frame assert_true: expected true got false
FAIL GeolocationSensor: losing a document's frame with an active sensor does not crash assert_true: expected true got false
FAIL GeolocationSensor: sensor is suspended and resumed when focus traverses from to cross-origin frame assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: sensor is not suspended when focus traverses from to same-origin frame assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: losing a document's frame with an active sensor does not crash assert_implements: GeolocationSensor is not supported. undefined
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL GeolocationSensor: Test that onerror is sent when sensor is not supported. assert_true: expected true got false
FAIL GeolocationSensor: Test that onerror is sent when permissions are not granted. assert_true: expected true got false
FAIL GeolocationSensor: Test that onerror is send when start() call has failed. assert_true: expected true got false
FAIL GeolocationSensor: Test that frequency is capped to allowed maximum. assert_true: expected true got false
FAIL GeolocationSensor: Test that frequency is capped to the maximum supported frequency. assert_true: expected true got false
FAIL GeolocationSensor: Test that frequency is limited to the minimum supported frequency. assert_true: expected true got false
FAIL GeolocationSensor: Test that sensor cannot be constructed within iframe disallowed to use feature policy. assert_true: expected true got false
FAIL GeolocationSensor: Test that sensor can be constructed within an iframe allowed to use feature policy. assert_true: expected true got false
FAIL GeolocationSensor: Test that 'onreading' is called and sensor reading is valid. assert_true: expected true got false
FAIL GeolocationSensor: sensor reading is correct. assert_true: expected true got false
FAIL GeolocationSensor: sensor timestamp is updated when time passes. assert_true: expected true got false
FAIL GeolocationSensor: Test that sensor can be successfully created and its states are correct. assert_true: expected true got false
FAIL GeolocationSensor: sensor.start() returns undefined. assert_true: expected true got false
FAIL GeolocationSensor: no exception is thrown when calling start() on already started sensor. assert_true: expected true got false
FAIL GeolocationSensor: sensor.stop() returns undefined. assert_true: expected true got false
FAIL GeolocationSensor: no exception is thrown when calling stop() on already stopped sensor. assert_true: expected true got false
FAIL GeolocationSensor: Test that fresh reading is fetched on start(). assert_true: expected true got false
FAIL GeolocationSensor: frequency hint works. assert_true: expected true got false
FAIL GeolocationSensor: throw 'TypeError' if frequency is invalid. assert_true: expected true got false
FAIL GeolocationSensor: Test that onerror is sent when sensor is not supported. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that onerror is sent when permissions are not granted. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that onerror is send when start() call has failed. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that frequency is capped to allowed maximum. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that frequency is capped to the maximum supported frequency. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that frequency is limited to the minimum supported frequency. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that sensor cannot be constructed within iframe disallowed to use feature policy. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that sensor can be constructed within an iframe allowed to use feature policy. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that 'onreading' is called and sensor reading is valid. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: sensor reading is correct. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: sensor timestamp is updated when time passes. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that sensor can be successfully created and its states are correct. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: sensor.start() returns undefined. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: no exception is thrown when calling start() on already started sensor. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: sensor.stop() returns undefined. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: no exception is thrown when calling stop() on already stopped sensor. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: Test that fresh reading is fetched on start(). assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: frequency hint works. assert_implements: GeolocationSensor is not supported. undefined
FAIL GeolocationSensor: throw 'TypeError' if frequency is invalid. assert_implements: GeolocationSensor is not supported. undefined
Harness: the test ran to completion.
......@@ -2,8 +2,8 @@ This is a testharness.js-based test.
PASS Magnetometer: Feature-Policy header magnetometer 'none' disallows the top-level document.
PASS Magnetometer: Feature-Policy header magnetometer 'none' disallows same-origin iframes.
PASS Magnetometer: Feature-Policy header magnetometer 'none' disallows cross-origin iframes.
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'none' disallows the top-level document. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'none' disallows same-origin iframes. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'none' disallows cross-origin iframes. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'none' disallows the top-level document. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'none' disallows same-origin iframes. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'none' disallows cross-origin iframes. assert_implements: UncalibratedMagnetometer is not supported. undefined
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Magnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin relocation
PASS Magnetometer: Feature-Policy allow='magnetometer' attribute disallows cross-origin relocation
FAIL UncalibratedMagnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin relocation assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy allow='magnetometer' attribute disallows cross-origin relocation assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin relocation assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Feature-Policy allow='magnetometer' attribute disallows cross-origin relocation assert_implements: UncalibratedMagnetometer is not supported. undefined
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Magnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin iframe
PASS Magnetometer: Feature-Policy allow='magnetometer' attribute allows cross-origin iframe
FAIL UncalibratedMagnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin iframe assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy allow='magnetometer' attribute allows cross-origin iframe assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy allow='magnetometer' attribute allows same-origin iframe assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Feature-Policy allow='magnetometer' attribute allows cross-origin iframe assert_implements: UncalibratedMagnetometer is not supported. undefined
Harness: the test ran to completion.
......@@ -2,8 +2,8 @@ This is a testharness.js-based test.
PASS Magnetometer: Feature-Policy header magnetometer * allows the top-level document.
PASS Magnetometer: Feature-Policy header magnetometer * allows same-origin iframes.
PASS Magnetometer: Feature-Policy header magnetometer * allows cross-origin iframes.
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer * allows the top-level document. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer * allows same-origin iframes. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer * allows cross-origin iframes. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer * allows the top-level document. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer * allows same-origin iframes. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer * allows cross-origin iframes. assert_implements: UncalibratedMagnetometer is not supported. undefined
Harness: the test ran to completion.
......@@ -2,8 +2,8 @@ This is a testharness.js-based test.
PASS Magnetometer: Feature-Policy header magnetometer 'self' allows the top-level document.
PASS Magnetometer: Feature-Policy header magnetometer 'self' allows same-origin iframes.
PASS Magnetometer: Feature-Policy header magnetometer 'self' disallows cross-origin iframes.
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'self' allows the top-level document. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'self' allows same-origin iframes. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'self' disallows cross-origin iframes. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'self' allows the top-level document. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'self' allows same-origin iframes. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Feature-Policy header magnetometer 'self' disallows cross-origin iframes. assert_implements: UncalibratedMagnetometer is not supported. undefined
Harness: the test ran to completion.
......@@ -2,8 +2,8 @@ This is a testharness.js-based test.
PASS Magnetometer: sensor is suspended and resumed when focus traverses from to cross-origin frame
PASS Magnetometer: sensor is not suspended when focus traverses from to same-origin frame
PASS Magnetometer: losing a document's frame with an active sensor does not crash
FAIL UncalibratedMagnetometer: sensor is suspended and resumed when focus traverses from to cross-origin frame assert_true: expected true got false
FAIL UncalibratedMagnetometer: sensor is not suspended when focus traverses from to same-origin frame assert_true: expected true got false
FAIL UncalibratedMagnetometer: losing a document's frame with an active sensor does not crash assert_true: expected true got false
FAIL UncalibratedMagnetometer: sensor is suspended and resumed when focus traverses from to cross-origin frame assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: sensor is not suspended when focus traverses from to same-origin frame assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: losing a document's frame with an active sensor does not crash assert_implements: UncalibratedMagnetometer is not supported. undefined
Harness: the test ran to completion.
......@@ -20,26 +20,26 @@ PASS Magnetometer: frequency hint works.
PASS Magnetometer: throw 'TypeError' if frequency is invalid.
PASS Magnetometer: sensor reading is correct when options.referenceFrame is 'screen'.
PASS Magnetometer: throw 'TypeError' if referenceFrame is not one of enumeration values.
FAIL UncalibratedMagnetometer: Test that onerror is sent when sensor is not supported. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that onerror is sent when permissions are not granted. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that onerror is send when start() call has failed. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that frequency is capped to allowed maximum. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that frequency is capped to the maximum supported frequency. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that frequency is limited to the minimum supported frequency. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that sensor cannot be constructed within iframe disallowed to use feature policy. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that sensor can be constructed within an iframe allowed to use feature policy. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that 'onreading' is called and sensor reading is valid. assert_true: expected true got false
FAIL UncalibratedMagnetometer: sensor reading is correct. assert_true: expected true got false
FAIL UncalibratedMagnetometer: sensor timestamp is updated when time passes. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that sensor can be successfully created and its states are correct. assert_true: expected true got false
FAIL UncalibratedMagnetometer: sensor.start() returns undefined. assert_true: expected true got false
FAIL UncalibratedMagnetometer: no exception is thrown when calling start() on already started sensor. assert_true: expected true got false
FAIL UncalibratedMagnetometer: sensor.stop() returns undefined. assert_true: expected true got false
FAIL UncalibratedMagnetometer: no exception is thrown when calling stop() on already stopped sensor. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that fresh reading is fetched on start(). assert_true: expected true got false
FAIL UncalibratedMagnetometer: frequency hint works. assert_true: expected true got false
FAIL UncalibratedMagnetometer: throw 'TypeError' if frequency is invalid. assert_true: expected true got false
FAIL UncalibratedMagnetometer: sensor reading is correct when options.referenceFrame is 'screen'. assert_true: expected true got false
FAIL UncalibratedMagnetometer: throw 'TypeError' if referenceFrame is not one of enumeration values. assert_true: expected true got false
FAIL UncalibratedMagnetometer: Test that onerror is sent when sensor is not supported. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that onerror is sent when permissions are not granted. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that onerror is send when start() call has failed. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that frequency is capped to allowed maximum. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that frequency is capped to the maximum supported frequency. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that frequency is limited to the minimum supported frequency. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that sensor cannot be constructed within iframe disallowed to use feature policy. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that sensor can be constructed within an iframe allowed to use feature policy. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that 'onreading' is called and sensor reading is valid. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: sensor reading is correct. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: sensor timestamp is updated when time passes. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that sensor can be successfully created and its states are correct. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: sensor.start() returns undefined. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: no exception is thrown when calling start() on already started sensor. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: sensor.stop() returns undefined. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: no exception is thrown when calling stop() on already stopped sensor. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: Test that fresh reading is fetched on start(). assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: frequency hint works. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: throw 'TypeError' if frequency is invalid. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: sensor reading is correct when options.referenceFrame is 'screen'. assert_implements: UncalibratedMagnetometer is not supported. undefined
FAIL UncalibratedMagnetometer: throw 'TypeError' if referenceFrame is not one of enumeration values. assert_implements: UncalibratedMagnetometer is not supported. undefined
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment