-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Create new test type aamtest for accessibility API testing
#57696
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
Open
spectranaut
wants to merge
14
commits into
master
Choose a base branch
from
acacia-wdspec-style-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
80f1246
Create new test type for accessibility API testing
spectranaut a45d66b
Fix mac tests
spectranaut 389751b
Fix windows
spectranaut 94cf02c
Refactor atspi_wrapper and fix flake
spectranaut 8765a3a
Refactor wrappers, formatting
spectranaut 4cf35c7
Enable firefox caching and don't poll for id
spectranaut 81691a3
Add back polling for firefox
spectranaut 9637525
Use test result 'PRECONDITION_FAILED' for tests on wrong platform
spectranaut 5d4e2f7
Update Atspi role inspection
spectranaut cb76309
Revert "Add back polling for firefox"
spectranaut d9a5796
Correct mac blockquote assertion
spectranaut 832ef1f
Use proper pytest parameterizing norms
spectranaut f1ebab5
In AXAPI: use the PID if it exists
spectranaut 904605c
Code review comments
spectranaut File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| comtypes==1.4.11; sys_platform == 'win32' | ||
| PyGObject==3.50.1; sys_platform == 'linux' and python_version >= '3.9' | ||
| PyGObject==3.48.2; sys_platform == 'linux' and python_version < '3.9' | ||
| pyobjc-framework-Accessibility==11.1; sys_platform == 'darwin' and python_version >= '3.9' | ||
| pyobjc-framework-ApplicationServices==11.1; sys_platform == 'darwin' and python_version >= '3.9' | ||
| pyobjc==10.3.2; sys_platform == 'darwin' and python_version < '3.9' | ||
| pyobjc-framework-Accessibility==10.3.2; sys_platform == 'darwin' and python_version < '3.9' | ||
| pyobjc-framework-ApplicationServices==10.3.2; sys_platform == 'darwin' and python_version < '3.9' |
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this will set
ACCESSIBILITY_ENABLED=1in the main wptrunner process permanently. If so,chromeinstances for later test types could inadvertently inherit this environment variable, inducing flakiness.I think it would be better to add
{"env": {"ACCESSIBILITY_ENABLED": "1"}}tobrowser_kwargsfortest_type=aamtest:wpt/tools/wptrunner/wptrunner/browsers/chrome.py
Lines 51 to 55 in 9bd5c2f
... which will be plumbed to the
chrome(driver)process tree here:wpt/tools/wptrunner/wptrunner/browsers/base.py
Line 360 in 9bd5c2f
Going to/from the
aamtesttype will always induce a browser restart, which will clearACCESSIBILITY_ENABLED=1.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for catching this and the pointers!
I immediately ran into a problem, though, to get it to work I need to update this line:
wpt/tools/wptrunner/wptrunner/browsers/base.py
Line 324 in 9bd5c2f
To:
It doesn't look like any other product uses the
envkey in their return frombrowser_kwargs, so I think this change might be fine to do?As another possibility, firefox_android.py returns a "env_extras" key:
wpt/tools/wptrunner/wptrunner/browsers/firefox_android.py
Line 83 in 9bd5c2f
Which seems to be used the way I want to use
self.env(as additional env variables, not the complete set)... but it is only used within firefox_android.py, and has a really confusing name collision with the "def env_extra()", which seems to be something very different (defined in all products but only used in sauce.py).Do you have an opinion about either direction? treat "env" as an addition environment variable with the one-line fix above, or return "env_extras" instead and add code to have it handled as additional env variables in either chrome.py... or maybe base.py?