| Index: LayoutTests/bluetooth/resources/requestDevice-in-iframe.html
|
| diff --git a/LayoutTests/bluetooth/resources/requestDevice-in-iframe.html b/LayoutTests/bluetooth/resources/requestDevice-in-iframe.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ac51b07440dd895f2b8494d6aee43a5293b1fadc
|
| --- /dev/null
|
| +++ b/LayoutTests/bluetooth/resources/requestDevice-in-iframe.html
|
| @@ -0,0 +1,20 @@
|
| +<!DOCTYPE html>
|
| +<script>
|
| + window.onmessage = messageEvent => {
|
| + if (messageEvent.data === 'Go') {
|
| + navigator.bluetooth.requestDevice({
|
| + filters: [{services: ['generic_access']}]
|
| + }).then(device => {
|
| + if (device.constructor.name === "BluetoothDevice") {
|
| + parent.postMessage('Success', '*');
|
| + } else {
|
| + parent.postMessage('FAIL: requestDevice in iframe returned ' + device, '*');
|
| + }
|
| + }).catch(err => {
|
| + console.error(err);
|
| + parent.postMessage('FAIL: ' + err, '*');
|
| + });
|
| + }
|
| + };
|
| + parent.postMessage("Ready", "*");
|
| +</script>
|
|
|