tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SensorErrorEvent-constructor.https.html (728B)


      1 <!DOCTYPE html>
      2 <title>SensorErrorEvent constructor</title>
      3 <link rel="help" href="https://w3c.github.io/sensors/#the-sensor-error-event-interface">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script>
      7  test(() => {
      8    assert_equals(SensorErrorEvent.length, 2);
      9    assert_throws_js(TypeError, () => new SensorErrorEvent('error'));
     10  }, 'SensorErrorEvent constructor without init dict');
     11 
     12  test(() => {
     13    const error = new DOMException;
     14    const event = new SensorErrorEvent('type', { error: error });
     15    assert_equals(event.type, 'type', 'type');
     16    assert_equals(event.error, error, 'error');
     17  }, 'SensorErrorEvent constructor with init dict');
     18 </script>