https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 92c857093784ffe21babd2d64564a9cba491c8b7 authored by Yuki Shiino on 26 December 2018, 13:48:42 UTC
v8binding: Implement timers with IDL callback function of type Function
Tip revision: 92c8570
not-processing-user-gesture.https.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
<script>
'use strict';
const test_desc = 'Requires a user gesture.';
const expected = new DOMException(
    'Must be handling a user gesture to show a permission request.',
    'SecurityError');

bluetooth_test(() => setUpHealthThermometerAndHeartRateDevices()
    .then(() => assert_promise_rejects_with_message(
        navigator.bluetooth.requestDevice({filters:[{services:['heart_rate']}]}),
        expected, 'User gesture is required')),
    test_desc);
</script>
back to top