-
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.
Add testdriver_features and use in Chrome
* Add testdriver_features * Choose ChromeDriverProtocol based on `testdriver_features` containing `bidi`
- Loading branch information
1 parent
3c2f2be
commit 1dad89c
Showing
14 changed files
with
248 additions
and
20 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
infrastructure/metadata/infrastructure/webdriver/bidi/subscription.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 |
---|---|---|
@@ -1 +1,2 @@ | ||
disabled: https://github.com/web-platform-tests/wpt/issues/47544 | ||
disabled: | ||
if product != "chrome": @True |
2 changes: 2 additions & 0 deletions
2
infrastructure/metadata/infrastructure/webdriver/bidi/subscription.window.js.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,2 @@ | ||
disabled: | ||
if product != "chrome": @True |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// META: title=Test console log are present | ||
// META: script=/resources/testdriver.js?feature=bidi | ||
|
||
'use strict'; | ||
|
||
promise_test(async () => { | ||
const some_message = "SOME MESSAGE"; | ||
// Subscribe to `log.entryAdded` BiDi events. This will not add a listener to the page. | ||
await test_driver.bidi.log.entry_added.subscribe(); | ||
// Add a listener for the log.entryAdded event. This will not subscribe to the event, so the subscription is | ||
// required before. The cleanup is done automatically after the test is finished. | ||
const log_entry_promise = test_driver.bidi.log.entry_added.once(); | ||
// Emit a console.log message. | ||
// Note: Lint rule is disabled in `lint.ignore` file. | ||
console.log(some_message); | ||
// Wait for the log.entryAdded event to be received. | ||
const event = await log_entry_promise; | ||
// Assert the log.entryAdded event has the expected message. | ||
assert_equals(event.args.length, 1); | ||
const event_message = event.args[0]; | ||
assert_equals(event_message.value, some_message); | ||
}, "Assert testdriver can subscribe and receive events"); |
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
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
Oops, something went wrong.