mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Remove the 29 byte length restriction, when requesting bluetooth devices
This commit is contained in:
parent
da89099e26
commit
b52f9e483f
6 changed files with 1 additions and 98 deletions
|
@ -7766,18 +7766,6 @@
|
|||
"url": "/_mozilla/mozilla/bluetooth/requestDevice/canonicalizeFilter/max-length-for-device-name-namePrefix.html"
|
||||
}
|
||||
],
|
||||
"mozilla/bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-name.html": [
|
||||
{
|
||||
"path": "mozilla/bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-name.html",
|
||||
"url": "/_mozilla/mozilla/bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-name.html"
|
||||
}
|
||||
],
|
||||
"mozilla/bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-namePrefix.html": [
|
||||
{
|
||||
"path": "mozilla/bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-namePrefix.html",
|
||||
"url": "/_mozilla/mozilla/bluetooth/requestDevice/canonicalizeFilter/max-length-for-name-in-adv-namePrefix.html"
|
||||
}
|
||||
],
|
||||
"mozilla/bluetooth/requestDevice/canonicalizeFilter/no-arguments.html": [
|
||||
{
|
||||
"path": "mozilla/bluetooth/requestDevice/canonicalizeFilter/no-arguments.html",
|
||||
|
@ -7802,18 +7790,6 @@
|
|||
"url": "/_mozilla/mozilla/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-device-name-namePrefix.html"
|
||||
}
|
||||
],
|
||||
"mozilla/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-name.html": [
|
||||
{
|
||||
"path": "mozilla/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-name.html",
|
||||
"url": "/_mozilla/mozilla/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-name.html"
|
||||
}
|
||||
],
|
||||
"mozilla/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-namePrefix.html": [
|
||||
{
|
||||
"path": "mozilla/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-namePrefix.html",
|
||||
"url": "/_mozilla/mozilla/bluetooth/requestDevice/canonicalizeFilter/unicode-max-length-for-name-in-adv-namePrefix.html"
|
||||
}
|
||||
],
|
||||
"mozilla/bluetooth/requestDevice/canonicalizeFilter/unicode-valid-length-name-name.html": [
|
||||
{
|
||||
"path": "mozilla/bluetooth/requestDevice/canonicalizeFilter/unicode-valid-length-name-name.html",
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<!doctype html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/_mozilla/mozilla/bluetooth/bluetooth-helpers.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
promise_test(t => {
|
||||
let name_too_long = 'a'.repeat(30);
|
||||
window.testRunner.setBluetoothMockDataSet(adapter_type.empty);
|
||||
return promise_rejects(
|
||||
t, 'NotFoundError', window.navigator.bluetooth.requestDevice({filters: [{name: name_too_long}]}),
|
||||
'Device name longer than 29');
|
||||
}, 'A device name longer than 29 must reject.');
|
||||
</script>
|
|
@ -1,14 +0,0 @@
|
|||
<!doctype html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/_mozilla/mozilla/bluetooth/bluetooth-helpers.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
promise_test(t => {
|
||||
let name_too_long = 'a'.repeat(30);
|
||||
window.testRunner.setBluetoothMockDataSet(adapter_type.empty);
|
||||
return promise_rejects(
|
||||
t, 'NotFoundError', window.navigator.bluetooth.requestDevice({filters: [{namePrefix: name_too_long}]}),
|
||||
'Device name longer than 29');
|
||||
}, 'A device name prefix longer than 29 must reject.');
|
||||
</script>
|
|
@ -1,17 +0,0 @@
|
|||
<!doctype html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/_mozilla/mozilla/bluetooth/bluetooth-helpers.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
promise_test(t => {
|
||||
// \u2764's UTF-8 respresentation is 3 bytes long.
|
||||
// 10 chars * 3 bytes/char = 30 bytes
|
||||
let unicode_name = '\u2764'.repeat(10);
|
||||
window.testRunner.setBluetoothMockDataSet(adapter_type.unicode_device);
|
||||
return promise_rejects(
|
||||
t, 'NotFoundError', window.navigator.bluetooth.requestDevice({filters: [{name: unicode_name}]}),
|
||||
'Device name longer than 29 bytes');
|
||||
}, 'Unicode string with utf8 representation between (29, 248] bytes in ' +
|
||||
'\'name\' must throw NotFoundError.');
|
||||
</script>
|
|
@ -1,17 +0,0 @@
|
|||
<!doctype html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/_mozilla/mozilla/bluetooth/bluetooth-helpers.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
promise_test(t => {
|
||||
// \u2764's UTF-8 respresentation is 3 bytes long.
|
||||
// 10 chars * 3 bytes/char = 30 bytes
|
||||
let unicode_name = '\u2764'.repeat(10);
|
||||
window.testRunner.setBluetoothMockDataSet(adapter_type.unicode_device);
|
||||
return promise_rejects(
|
||||
t, 'NotFoundError', window.navigator.bluetooth.requestDevice({filters: [{namePrefix: unicode_name}]}),
|
||||
'Device name longer than 29 bytes');
|
||||
}, 'Unicode string with utf8 representation between (29, 248] bytes in ' +
|
||||
'\'namePrefix\' must throw NotFoundError.');
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue