-
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.
Rename to
require_webdriver_bidi
+ add .js test
- Loading branch information
1 parent
3719fd8
commit b5ceae5
Showing
12 changed files
with
94 additions
and
69 deletions.
There are no files selected for viewing
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,23 @@ | ||
// META: title=Test console log are present | ||
// META: require_webdriver_bidi=true | ||
// META: script=/resources/testdriver.js | ||
|
||
'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
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