Replace AdvertisingData with AdvertisingEvent

This commit is contained in:
Attila Dusnoki 2016-12-12 11:19:03 +01:00
parent a2391162a1
commit 748b78a6bf
12 changed files with 237 additions and 99 deletions

View file

@ -6734,6 +6734,12 @@
"url": "/_mozilla/mozilla/binding_keyword.html"
}
],
"mozilla/bluetooth/advertisingEvent/watchAdvertisements-succeeds.html": [
{
"path": "mozilla/bluetooth/advertisingEvent/watchAdvertisements-succeeds.html",
"url": "/_mozilla/mozilla/bluetooth/advertisingEvent/watchAdvertisements-succeeds.html"
}
],
"mozilla/bluetooth/connect/connection-succeeds.html": [
{
"path": "mozilla/bluetooth/connect/connection-succeeds.html",

View file

@ -0,0 +1,4 @@
[watchAdvertisements-succeeds.html]
type: testharness
[watchAdvertisements should succeed.]
expected: FAIL

View file

@ -0,0 +1,14 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/_mozilla/mozilla/bluetooth/bluetooth-helpers.js"></script>
<script>
'use strict';
promise_test(() => {
window.testRunner.setBluetoothMockDataSet(adapter_type.heart_rate);
return window.navigator.bluetooth.requestDevice({
filters: [{services: [heart_rate.name]}]
})
.then(device => device.watchAdvertisements());
}, 'watchAdvertisements should succeed.');
</script>