Skip to content

Commit

Permalink
[sensors] Check that sensor frame and focused frame of same origin (w…
Browse files Browse the repository at this point in the history
…eb-platform-tests#11803)

web-platform-tests#11426 introduced new tests for mitigation stragegy defined in [1]
  for partial concrete sensors. This PR add the same tests for remain
  concrete sensors: Ambient Light Sensor, Geolocation Sensor, and Proximity.

  [1] https://www.w3.org/TR/generic-sensor/#focused-area
  • Loading branch information
Honry authored Jul 6, 2018
1 parent e6ac489 commit c9c1a7d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ambient-light/AmbientLightSensor-iframe-access.https.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>AmbientLightSensor iframe test</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://w3c.github.io/ambient-light/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/generic-sensor/generic-sensor-tests.js"></script>
<script src="/generic-sensor/generic-sensor-iframe-tests.sub.js"></script>
<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script>
<div id="log"></div>
<script>
run_generic_sensor_iframe_tests('AmbientLightSensor');
</script>
14 changes: 14 additions & 0 deletions geolocation-sensor/GeolocationSensor-iframe-access.https.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>GeolocationSensor iframe test</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://wicg.github.io/geolocation-sensor/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/generic-sensor/generic-sensor-tests.js"></script>
<script src="/generic-sensor/generic-sensor-iframe-tests.sub.js"></script>
<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script>
<div id="log"></div>
<script>
run_generic_sensor_iframe_tests('GeolocationSensor');
</script>
14 changes: 14 additions & 0 deletions proximity/ProximitySensor-iframe-access.https.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>ProximitySensor iframe test</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://w3c.github.io/proximity/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/generic-sensor/generic-sensor-tests.js"></script>
<script src="/generic-sensor/generic-sensor-iframe-tests.sub.js"></script>
<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script>
<div id="log"></div>
<script>
run_generic_sensor_iframe_tests('ProximitySensor');
</script>

0 comments on commit c9c1a7d

Please sign in to comment.