| 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
|
| deleted file mode 100644
|
| index 1060c73d79227c4d95893a4961cec186f9b2c424..0000000000000000000000000000000000000000
|
| --- a/third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html
|
| +++ /dev/null
|
| @@ -1,155 +0,0 @@
|
| -<!DOCTYPE html>
|
| -<script src="../resources/testharness.js"></script>
|
| -<script src="../resources/testharnessreport.js"></script>
|
| -<script src="../resources/bluetooth/bluetooth-helpers.js"></script>
|
| -<script>
|
| -'use strict';
|
| -
|
| -test(t => { assert_true(window.testRunner instanceof Object); t.done(); },
|
| - 'window.testRunner is required for the following tests.');
|
| -
|
| -let matching_services = [heart_rate.uuid];
|
| -let matching_name = 'Heart Rate Device';
|
| -let matching_namePrefix = 'Heart';
|
| -
|
| -let non_matching_services = ['battery_service'];
|
| -let non_matching_name = 'Some Device';
|
| -let non_matching_namePrefix = 'Some';
|
| -
|
| -[{
|
| - filters: [{
|
| - services: non_matching_services,
|
| - name: non_matching_name,
|
| - namePrefix: non_matching_namePrefix
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: matching_services,
|
| - name: non_matching_name,
|
| - namePrefix: non_matching_namePrefix
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: non_matching_services,
|
| - name: matching_name,
|
| - namePrefix: non_matching_namePrefix
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: matching_services,
|
| - name: matching_name,
|
| - namePrefix: non_matching_namePrefix
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: non_matching_services,
|
| - name: non_matching_name,
|
| - namePrefix: matching_namePrefix
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: matching_services,
|
| - name: non_matching_name,
|
| - namePrefix: matching_namePrefix
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: non_matching_services,
|
| - name: matching_name,
|
| - namePrefix: matching_namePrefix
|
| - }]
|
| -}].forEach(args => {
|
| - promise_test(t => {
|
| - return setBluetoothFakeAdapter('GlucoseHeartRateAdapter')
|
| - .then(() => promise_rejects(t,
|
| - 'NotFoundError',
|
| - requestDeviceWithKeyDown(args)));
|
| - }, 'If at least one filter doesn\'t match the promise must reject.');
|
| -});
|
| -
|
| -[{
|
| - filters: [{
|
| - services: non_matching_services,
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: non_matching_services,
|
| - name: non_matching_name,
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: non_matching_services,
|
| - namePrefix: non_matching_namePrefix
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - name: non_matching_name,
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - name: non_matching_name,
|
| - namePrefix: non_matching_namePrefix
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - namePrefix: non_matching_namePrefix
|
| - }]
|
| -}].forEach(args => {
|
| - promise_test(t => {
|
| - return setBluetoothFakeAdapter('GlucoseHeartRateAdapter')
|
| - .then(() => promise_rejects(t,
|
| - 'NotFoundError',
|
| - requestDeviceWithKeyDown(args)));
|
| - }, 'If a present filter\'s member doesn\'t match the device, ' +
|
| - 'the device doesn\'t match the filter.');
|
| -});
|
| -
|
| -[{
|
| - filters: [{
|
| - services: matching_services,
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: matching_services,
|
| - name: matching_name,
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - services: matching_services,
|
| - namePrefix: matching_namePrefix
|
| - }]
|
| -}, {
|
| - filters: [{
|
| - name: matching_name,
|
| - }],
|
| - optionalServices: matching_services
|
| -}, {
|
| - filters: [{
|
| - name: matching_name,
|
| - namePrefix: matching_namePrefix
|
| - }],
|
| - optionalServices: matching_services
|
| -}, {
|
| - filters: [{
|
| - namePrefix: matching_namePrefix
|
| - }],
|
| - optionalServices: matching_services
|
| -}, {
|
| - filters: [{
|
| - services: matching_services,
|
| - name: matching_name,
|
| - namePrefix: matching_namePrefix
|
| - }]
|
| -}].forEach(args => {
|
| - promise_test(() => {
|
| - 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.');
|
| -});
|
| -</script>
|
|
|