Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/bluetooth/getCharacteristics/characteristics-not-found.html |
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/getCharacteristics/characteristics-not-found.html b/third_party/WebKit/LayoutTests/bluetooth/getCharacteristics/characteristics-not-found.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..094c91171018f4588487e9cb9662a041247c9297 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/bluetooth/getCharacteristics/characteristics-not-found.html |
| @@ -0,0 +1,17 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../resources/bluetooth-helpers.js"></script> |
| +<script> |
| +'use strict'; |
| +promise_test(() => { |
| + testRunner.setBluetoothMockDataSet('MissingCharacteristicHeartRateAdapter'); |
| + let expected = new DOMException('No Characteristics found in service.', |
|
Jeffrey Yasskin
2016/02/24 23:20:30
Just inline this?
ortuno
2016/02/25 23:08:27
Done.
|
| + 'NotFoundError'); |
| + return requestDeviceWithKeyDown({filters: [{services: ['heart_rate']}]}) |
| + .then(device => device.gatt.connect()) |
| + .then(gattServer => gattServer.getPrimaryService('heart_rate')) |
| + .then(service => assert_promise_rejects_with_message( |
| + service.getCharacteristics(), expected)) |
| +}, 'Request for absent characteristics. Reject with NotFoundError.'); |
| +</script> |