| Index: third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html
|
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html b/third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html
|
| index 4a07dc15cf122d70542fdbbfd1540c20cdfb77f3..4257dd2d861bb10a0e83fd03c0f0b2eefeedb23f 100644
|
| --- a/third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html
|
| +++ b/third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html
|
| @@ -61,9 +61,10 @@ let non_matching_namePrefix = 'Some';
|
| }]
|
| }].forEach(args => {
|
| promise_test(() => {
|
| - testRunner.setBluetoothMockDataSet('GlucoseHeartRateAdapter');
|
| - return assert_promise_rejects(requestDeviceWithKeyDown(args),
|
| - new DOMException('', 'NotFoundError'));
|
| + return setBluetoothFakeAdapter('GlucoseHeartRateAdapter')
|
| + .then(() => assert_promise_rejects(
|
| + requestDeviceWithKeyDown(args),
|
| + new DOMException('', 'NotFoundError')));
|
| }, 'If at least one filter doesn\'t match the promise must reject.');
|
| });
|
|
|
| @@ -96,9 +97,10 @@ let non_matching_namePrefix = 'Some';
|
| }]
|
| }].forEach(args => {
|
| promise_test(() => {
|
| - testRunner.setBluetoothMockDataSet('GlucoseHeartRateAdapter');
|
| - return assert_promise_rejects(requestDeviceWithKeyDown(args),
|
| - new DOMException('', 'NotFoundError'));
|
| + return setBluetoothFakeAdapter('GlucoseHeartRateAdapter')
|
| + .then(() => assert_promise_rejects(
|
| + requestDeviceWithKeyDown(args),
|
| + new DOMException('', 'NotFoundError')));
|
| }, 'If a present filter\'s member doesn\'t match the device, ' +
|
| 'the device doesn\'t match the filter.');
|
| });
|
| @@ -141,14 +143,14 @@ let non_matching_namePrefix = 'Some';
|
| }]
|
| }].forEach(args => {
|
| promise_test(() => {
|
| - testRunner.setBluetoothMockDataSet('GlucoseHeartRateAdapter');
|
| - return requestDeviceWithKeyDown(args).then(device => {
|
| + return setBluetoothFakeAdapter('GlucoseHeartRateAdapter')
|
| + .then(() => requestDeviceWithKeyDown(args)).then(device => {
|
| // We always have access to the services in matching_services
|
| // because we include them in a filter or in optionalServices.
|
| assert_in_array(matching_services[0], device.uuids);
|
| assert_equals(device.name, matching_name);
|
| assert_true(device.name.startsWith(matching_namePrefix));
|
| });
|
| - }, 'Matches a filter if all present members match.')
|
| + }, 'Matches a filter if all present members match.');
|
| });
|
| </script>
|
|
|