Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wdspec] fix extension tests for Chrome #51016

Merged
merged 2 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lint.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ TRAILING WHITESPACE, INDENT TABS, CR AT EOL: *.sxg
TRAILING WHITESPACE, INDENT TABS, CR AT EOL: *.wbn
TRAILING WHITESPACE, INDENT TABS, CR AT EOL: *.avif
TRAILING WHITESPACE, INDENT TABS, CR AT EOL: *.annexb
TRAILING WHITESPACE, INDENT TABS, CR AT EOL: *.crx

## .gitignore
W3C-TEST.ORG: .gitignore
Expand Down
4 changes: 2 additions & 2 deletions webdriver/tests/bidi/web_extension/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"chrome": {
"id": None,
"path": get_extension_path("chrome/unpacked/"),
"archivePath": None,
"archivePath": get_extension_path("chrome/packed.crx"),
"archivePathInvalid": get_extension_path("chrome/invalid"),
"base64": None,
"base64": get_base64_for_extension_file("chrome/packed.crx"),
}
}

Expand Down
5 changes: 4 additions & 1 deletion webdriver/tests/bidi/web_extension/install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ async def test_install_from_path(bidi_session, extension_data):
}
)
try:
assert web_extension == extension_data["id"]
if extension_data["id"] is None:
assert isinstance(web_extension, str)
else:
assert web_extension == extension_data["id"]
Comment on lines +28 to +31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind creating a helper for it so that it can be shared with all the other tests doing the same assertion?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be only used for the unpacked test. We could add a helper once there are more tests like this.

finally:
# Clean up the extension.
await bidi_session.web_extension.uninstall(extension=web_extension)
Expand Down
Binary file not shown.
Loading