Index: third_party/WebKit/LayoutTests/bluetooth/requestDevice/single-filter-two-services-fails.html |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/requestDevice/single-filter-two-services-fails.html b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/single-filter-two-services-fails.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5f20fab55d1695cc934aa879ede8c27799886ce1 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/single-filter-two-services-fails.html |
@@ -0,0 +1,16 @@ |
+<!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'; |
+promise_test(t => { |
+ // Both devices support the Heart Rate service, but things need to |
+ // support both services to pass the filter, and neither has a Battery |
+ // service. |
+ return setBluetoothFakeAdapter('GlucoseHeartRateAdapter') |
+ .then(() => promise_rejects( |
+ t, 'NotFoundError', requestDeviceWithKeyDown({ |
+ filters: [{services: ['heart_rate', 'battery_service']}]}))); |
+}, 'Too-strict filters do prevent matching.'); |
+</script> |