commit | 7c61a4594a95682531367b6956d1c37f8b8fd486 | [log] [tgz] |
---|---|---|
author | Daniel Smith <56164590+DanielRyanSmith@users.noreply.github.com> | Thu Mar 24 05:28:07 2022 |
committer | GitHub <noreply@github.com> | Thu Mar 24 05:28:07 2022 |
tree | f608e74d4fdc8d9a9edcab3abb3db8f2f24f4640 | |
parent | 9ab37baf82fdf90d752c8a44287d351d7890e1db [diff] |
Split Chrome and Chromium into separate products (#32485) * Chromium as a separate product Chromium will need to be pulled from Chrome's implementation as a separate product. This commit creates the skeleton for Chromium as a separate product, while still being functionally identical to Chrome. * Separate Chrome and Chromium functionality Currently, we only install Chromium tip-of-tree using the `./wpt install` command. Because a Chrome binary cannot be installed, we no longer try to find a binary in the virtual environment for Chrome. Addtionally, trying to install Chrome via wpt will raise a NotImplementedError. Functionality for installing chromedriver is shared, however the chromedriver for each product will now be saved in a folder with their respective product name i.e. `venv/bin/{product}/chromedriver`. This removes the need to detect the wrong chromedriver or reinstall a new chromedriver when switching from testing Chrome to Chromium, or vice-versa. Some refactoring and moving some actions to private methods has occurred in this commit. * allow user to supply browser version for install command the `--browser-version` command line argument is now supported for `./wpt install`. This will allow the user to download a specific version of the Chromium browser binary or chromedriver associated with that version. * update install tests to reflect split change Install also now includes a check to make sure that the `--browser-version` install argument can only be supplied with chrome and chromium product. * increase pipeline timeout * adjust browser_version install logic Changing logic for accessing the browser_version command line argument and ensuring that it is not called on browsers that do not support it. * line and string reformatting for Chrome/Chromium classes in browser.py * ensure browser setup checks venv path for webdrvier * Refactor run.py to allow browsers to use same setup Edge, Chrome, and Chromium have very similar browser setup processes. This change refactors the instantiation of browser setup classes to allow multiple browsers to use the same setup class. * Error handling for checking webdriver version If a null webdriver path is passed to `webdriver_version`, It will now show a warning and return null. remove whitespace small refactoring changes to browser.py ChromeChromiumBase's private method `_get_chromium_url_by_version` no longer takes in a file name argument to reduce coupling. - Getting latest chromium revision has been moved to a separate private method, `_get_latest_chromium_revision`. * Add new test for attempting to install Chrome A new test was added to ensure a NotImplementedError is raised when attempting to install Chrome via `wpt install` remove line whitespace remove unused variable * Ensure Chromium revision number consistency This change ensures that if multiple Chromium components are downloaded in a single invocation, all of those components will be downloaded using the same revision number. Affects the browser binary, webdriver, and mojojs. * Changes based on review feedback - f-string changes - Update logic for revision numbers to be more readable - Ensure Chrome and Chromium's webdriver installs are handled separately and properly - Move revision number references to Chromium class - Move Chromium-specific methods to correct class - Update tests to use Chromium over Chrome * Change find_binary handling for Chromium - Check specific channel directories for Chromium - Pass filename to _format_chromium_snapshot_url - Throw request exception when all Chromedriver downloads fail for Chrome * Chrome installs chromedriver by version arg - Keep successful download url, not revision - Raise FileNotFoundError for install_webdriver - If not browser binary is provided or detected. = More concise logic for browser setup * Use _venv3 directory to install/detect binary if it exists (#32835) * docs describing installation and detection - Concise commenting and attributes - Use Chrome's wptrunner functions for Chromium - Update Chromium BrowserSetup to inherit Chrome's * Add links to documentation * make changes to webdriver install decisions * change docs wording * update tests * Move revision detection method into shared class * explicit typing for BrowserSetup attribute * correct mypy typing * Changes suggest by @jgraham Small wording changes to comments/docstrings as well. * add filename to last url used * Update docs/running-tests/chrome-chromium-installation-detection.md Co-authored-by: Philip Jägenstedt <philip@foolip.org> * Update docs/running-tests/chrome-chromium-installation-detection.md Co-authored-by: Philip Jägenstedt <philip@foolip.org> Update docs/running-tests/chrome-chromium-installation-detection.md * Apply suggestions from @foolip docs review Co-authored-by: Philip Jägenstedt <philip@foolip.org> * Doc formatting and change request also, - small syntactic and comment changes - added TODO comment for Chrome version matching logic * Update docs * Update chrome-chromium-installation-detection.md * Apply suggestions from code review changes suggested by @foolip Co-authored-by: Philip Jägenstedt <philip@foolip.org> * Changes based on feedback - descriptive comment about getting base revision from version - remove duplicated code Co-authored-by: Philip Jägenstedt <philip@foolip.org>
The web-platform-tests Project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.
The most important sources of information and activity are:
wpt:matrix.org
matrix channel; includes participants located around the world, but busiest during the European working day.If you'd like clarification about anything, don't hesitate to ask in the chat room or on the mailing list.
Clone or otherwise get https://github.com/web-platform-tests/wpt.
Note: because of the frequent creation and deletion of branches in this repo, it is recommended to “prune” stale branches when fetching updates, i.e. use git pull --prune
(or git fetch -p && git merge
).
See the documentation website and in particular the system setup for running tests locally.
The wpt
command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:
wpt serve
- For starting the wpt http serverwpt run
- For running tests in a browserwpt lint
- For running the lint against all testswpt manifest
- For updating or generating a MANIFEST.json
test manifestwpt install
- For installing the latest release of a browser or webdriver server on the local machine.wpt serve-wave
- For starting the wpt http server and the WAVE test runner. For more details on how to use the WAVE test runner see the documentation.On Windows wpt
commands must be prefixed with python
or the path to the python binary (if python
is not in your %PATH%
).
python wpt [command]
Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wpt
commands.
Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false
in your working tree.
The master branch is automatically synced to wpt.live and w3c-test.org.
Save the Web, Write Some Tests!
Absolutely everyone is welcome to contribute to test development. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.
The way to contribute is just as usual:
git checkout -b topic
../wpt lint
as described above.If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!