| <!DOCTYPE html> |
| <script src="../../../resources/testharness.js"></script> |
| <script src="../../../resources/testharnessreport.js"></script> |
| <script src="../../../resources/testdriver.js"></script> |
| <script src="../../../resources/testdriver-vendor.js"></script> |
| <script src="../../../external/wpt/bluetooth/resources/bluetooth-helpers.js"></script> |
| <script> |
| 'use strict'; |
| // TODO(https://crbug.com/719826): This is a temporary test to try the |
| // FakeBluetoothChooser API as it is implemented. This test should be delete |
| // after the feature is completed. The implementation details can be found in |
| // the design document. |
| // https://docs.google.com/document/d/1XFl_4ZAgO8ddM6U53A9AfUuZeWgJnlYD5wtbXqEpzeg |
| const test_desc = 'Ensure that the FakeBluetoothChooser API works correctly.'; |
| |
| bluetooth_test( |
| () => navigator.bluetooth.test.simulateCentral({state: 'powered-on'}) |
| .then(() => navigator.bluetooth.test.getManualChooser()) |
| .then(chooser => assert_true(typeof chooser !== 'undefined')), |
| test_desc); |
| </script> |