blob: 19ad407c93e2ab55d253186abee302f0bc551e0e [file] [log] [blame]
<!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 = 'A device disconnecting while connected should fire the ' +
'gattserverdisconnected event.';
bluetooth_test(() => getHealthThermometerDevice()
.then(({device, fake_peripheral}) => {
fake_peripheral.simulateGATTDisconnection();
return eventPromise(device, 'gattserverdisconnected');
})
.then(e => assert_true(e.bubbles)),
test_desc);
</script>