You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR updates the chromium_driver fixture used in the tests in bidi_webextension_tests.py so they use the --browser-binary and --driver-binary args passed by bazel. This will allow these tests to use pinned browsers when running in RBE.
🔄 Types of changes
Build/Test
PR Type
Tests
Description
Update chromium driver fixture to use pinned browsers
Add support for browser binary and driver executable paths
Enable RBE compatibility for BiDi webextension tests
Diagram Walkthrough
flowchart LR
A["Test Configuration"] --> B["Browser Binary Path"]
A --> C["Driver Executable Path"]
B --> D["Chromium Options"]
C --> E["Browser Service"]
D --> F["Chromium Driver"]
E --> F
Loading
File Walkthrough
Relevant files
Tests
bidi_webextension_tests.py
Configure pinned browser support for chromium driver
The temporary directory created with tempfile.mkdtemp() is not being cleaned up after the test completes. This could lead to disk space issues over time as temporary directories accumulate.
The variable temp_dir is used on line 144 but is only defined within the conditional block on line 140. This will cause a NameError if the code path doesn't execute the assignment.
Add an else clause to handle unsupported driver options. Without this, browser_service could be undefined if an unexpected driver option is passed, leading to a NameError when creating the service.
Why: The suggestion correctly points out that if driver_option is not 'chrome' or 'edge', browser_service will be unassigned, leading to a NameError. Adding an else clause to handle this case improves the code's robustness.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
💥 What does this PR do?
This PR updates the
chromium_driverfixture used in the tests inbidi_webextension_tests.pyso they use the--browser-binaryand--driver-binaryargs passed by bazel. This will allow these tests to use pinned browsers when running in RBE.🔄 Types of changes
PR Type
Tests
Description
Update chromium driver fixture to use pinned browsers
Add support for browser binary and driver executable paths
Enable RBE compatibility for BiDi webextension tests
Diagram Walkthrough
File Walkthrough
bidi_webextension_tests.py
Configure pinned browser support for chromium driverpy/test/selenium/webdriver/common/bidi_webextension_tests.py