blob: 7acc6d3459b8fb585ddf396bc9b1b185a0504cf0 [file] [log] [blame]
<!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';
bluetooth_test(() => {
// \u00A1's UTF-8 respresentation is 2 bytes long.
// 124 chars * 2 bytes/char = 248 bytes
const DEVICE_NAME = '\u00A1'.repeat(124);
return setUpPreconnectedDevice({name: DEVICE_NAME})
.then(() => requestDeviceWithKeyDown({ filters: [{name: DEVICE_NAME}]}))
.then(device => assert_equals(device.name, DEVICE_NAME));
}, 'A unicode device name of 248 bytes is valid.');
</script>