-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[testdriver] Add
test_driver.bidi.bluetooth.simulate_adapter
(#49193)
Add `test_driver.bidi.bluetooth.simulate_adapter` method matching [`bluetooth.simulateAdapter`](https://webbluetoothcg.github.io/web-bluetooth/#bluetooth-simulateAdapter-command)WebDriver BiDi command and extend the documentation. RFC is not required, as the method matches a WebDriver BiDi command. --------- Co-authored-by: Alex Rudenko <[email protected]>
- Loading branch information
1 parent
f15ff9f
commit 6cf69a4
Showing
8 changed files
with
153 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_adapter.https.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
disabled: https://github.com/web-platform-tests/wpt/issues/47544 |
36 changes: 36 additions & 0 deletions
36
infrastructure/testdriver/bidi/bluetooth/simulate_adapter.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"/> | ||
<title>TestDriver bidi.bluetooth.simulate_adapter method</title> | ||
<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> | ||
promise_test(async (t) => { | ||
await test_driver.bidi.bluetooth.simulate_adapter({ | ||
state: "absent" | ||
}); | ||
|
||
assert_equals(false, await navigator.bluetooth.getAvailability(), | ||
"Assert bluetooth is not available"); | ||
}, "simulate bluetooth adapter 'absent'"); | ||
|
||
promise_test(async (t) => { | ||
await test_driver.bidi.bluetooth.simulate_adapter({ | ||
state: "powered-off" | ||
}); | ||
|
||
assert_equals(true, await navigator.bluetooth.getAvailability(), | ||
"Assert bluetooth available"); | ||
}, "simulate bluetooth adapter 'powered-off'"); | ||
|
||
promise_test(async (t) => { | ||
await test_driver.bidi.bluetooth.simulate_adapter({ | ||
state: "powered-on" | ||
}); | ||
|
||
assert_equals(true, await navigator.bluetooth.getAvailability(), | ||
"Assert bluetooth available"); | ||
}, "simulate bluetooth adapter 'powered-on'"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters