Auto merge of #14552 - szeged:advertising_event, r=jdm

Replace AdvertisingData with AdvertisingEvent

<!-- Please describe your changes on the following line: -->
The spec changed AdvertisingData to an event. The low level support is still missing.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [X] There are tests for these changes

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14552)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-12-14 13:53:51 -08:00 committed by GitHub
commit eb1bd59682
12 changed files with 237 additions and 99 deletions

View file

@ -6746,6 +6746,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>