Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-missing-device-from-name-prefix-filter.html

Issue 2014473002: bluetooth: Web Bluetooth can filter by empty device names, doesn't leak MACs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-GetNameOrEmpty-
Patch Set: addressed nits Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-missing-device-from-name-prefix-filter.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-missing-device-from-name-prefix-filter.html b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-missing-device-from-name-prefix-filter.html
new file mode 100644
index 0000000000000000000000000000000000000000..f3972a6290caca2fb791cb6e035ed61006b85862
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/name-missing-device-from-name-prefix-filter.html
@@ -0,0 +1,17 @@
+<!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 => {
+ return setBluetoothFakeAdapter('NoNameHeartRateAdapter')
+ .then(() => promise_rejects(
+ t, 'NotFoundError', requestDeviceWithKeyDown({
+ filters: [{
+ namePrefix: 'a',
+ services: ['heart_rate']
+ }]})));
+}, 'An unnamed device can not be obtained by namePrefix filter.');
+</script>
+

Powered by Google App Engine
This is Rietveld 408576698