Revision 7792accba7c0f7bb80f50c8ac81da5387227224b authored by Chromium WPT Sync on 24 February 2017, 17:10:11 UTC, committed by GitHub on 24 February 2017, 17:10:11 UTC
Add tests for exiting from nested fullscreen
AmbientLightSensor_onerror-manual.https.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>AmbientLightSensor Test: onerror</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://www.w3.org/TR/ambient-light/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<h2>Precondition</h2>
<ol>
<li>
Disable the Ambient Light Sensor or run test on a device without Amibent Light Sensor.
</li>
</ol>
<div id="log"></div>
<script>
let sensor;
setup(() => {
sensor = new AmbientLightSensor();
});
async_test(t => {
sensor.onactivate = t.step_func_done(assert_unreached);
sensor.onerror = t.step_func_done(event => {
assert_equals(sensor.state, 'errored');
assert_equals(event.error.name, 'NotFoundError');
});
sensor.start();
}, "Test that 'onerror' event is fired when sensor is not supported");
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...