This improves the process of updating screenshots in Interaction tests by collecting the screenshots already generated when devtools_frontend* builders fail.
Deprecates scripts/tools/update_goldens.py (v1) which need to be kept here until we update other impacted projects.
Bug: chromium:1413723
Change-Id: I37ba934d37d2287f105c76fe5bca5018078a9031
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4286875
Commit-Queue: Liviu Rau <liviurau@google.com>
Reviewed-by: Andres Olivares <andoli@chromium.org>
The issue here was that in SDK we have an actual class called Event,
which was messing with the rule which assumed that any extending of
Event was extending the built in HTML Event class. The rule is now
updated to detect locally declared Event classes, and not run the rule
in this instance.
Bug: none
Change-Id: Ib90054728566cb55d367a241130d70b81aeb1e79
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4262676
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
This is the first step in differentiating between events that map 1-1
onto a trace event payload and those that we construct.
Also includes a drive-by fix to the ESLint custom naming rule to fix an
error when the class it is trying to lint does not have a constructor
and does not call super(). A further fix for the fact that this custom
events rule flags false positives in this file is implemented in
crrev.com/c/4259791, at which point we will not have to disable the rule
in this file.
Bug: 1416836
Change-Id: Ia943fa95aeed74b6dc5e51d240a92cc945d02a89
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4259796
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
We now roll a "deprecation.json5" file from blink into DevTools that
serves as the canonical source for deprecations: It contains the
english message + note for translators as well as additional
metadata such as milestone and chrome feature number.
To use the .json5 in a somewhat type-safe way, we generate
TypeScript that is type-checked against the DeprecationIssueType
from CDP.
Note that we also generate a standard UIStrings structure that
we'll import in "DeprecationIssue.ts". An alternative would be to
collect to strings directly from the .json5 but that would
complicate "npm run collect-strings" as we'd have to teach those
scripts how to parse the .json5.
DISABLE_THIRD_PARTY_CHECK=Add newly generated file
R=alexrudenko@chromium.org
Bug: 1411444
Change-Id: Ifcfd4291ebfc3a70c100ba4a5fbefc485d4a5493
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4227691
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Currently, roll_deps.py only supports to roll up ToT of Chromium
repository. If working tree is dirty, it fails in
`git checkout origin/main`.
This CL adds to it a --ref option to control which of ToT or working
tree is used. This enables a new development flow: Write CDP changes
and backend code, and check it using frontend before CL lands.
Bug: none
Change-Id: Ic386d62addec124e9c4c01c3a0bb4469e9193de9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4197025
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ken Okada <kenoss@chromium.org>
Porting the internal script to devtools-frontend. Folders are created for each platform to prevent file not found errors.
The implementation is almost identical to the internal version, except:
- Support for windows presubmit bots, on which this didn't run before.
- Interactions root folder is passed as an argument to the script.
Bug: 1407638
Change-Id: Ia373ad258071cdcc0f7e5b417fcc2301d43084ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207837
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
A new rule is added that checks that calls to itScreenshot are only made
within the newly added directory for the Performance Panel interactions
tests. This plus the rule that ensures screenshots are asserted in an
itScreenshot block, restrict using the screenshot test API outside of
the mentioned directory.
Bug: 1407638
Change-Id: I6cff308e9c150bfa231bd65b6190aa293273910a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207836
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
This CL adds a script that takes a directory and will validate that all
JavaScript dependencies that are imported are also defined in BUILD.gn,
and vice-versa.
=> node scripts/deps/sync-build-gn-imports.js\
--directory=front_end/models/trace
The script is non recursive.
You can also execute the tests: `./node_modules/.bin/mocha
scripts/deps/tests`. These are only run locally and not yet run on CQ,
although I suspect we should have them run automatically.
This CL doesn't enable this script to run in anyway; the long term goal
is to have it run in a PRESUBMIT, however testing it locally has
uncovered quite a few invalid BUILD.gn files, so we'll need to fix them
one by one and enable the script incrementally.
Bug: 1402989
Change-Id: I587ba1a18a2edf7a126bda651cab79862e9ba525
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4115751
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
This CL adds the eslint-plugin-jsdoc plugin and enables just one rule,
`jsdoc/check-alignment`, which ensures that all the lines in a comment
are correctly aligned. For example:
```
/**
* foo
* bar
*/
```
Would fail the check and be corrected to:
```
/**
* foo
* bar
*/
```
DISABLE_THIRD_PARTY_CHECK=deliberate install + use of
eslint-plugin-jsdoc node_module
Bug: none
Change-Id: I969983cd550653654a334ede3409b8c850467245
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4110906
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
We had to disable CSSNano because it was causing broken fonts in release
builds (exact reason TBC). This CL installs the `cssnano-preset-lite`
package which applies only the following optimisations:
1. remove whitespace
2. remove empty rules (e.g. `div{}`).
3. remove comments
This should be far less risky and unlikely to cause unexpected
breakages.
DISABLE_THIRD_PARTY_CHECK=installed & used cssnano-preset-lite in the
same CL.
Bug: 1399763
Change-Id: I7fdd8b70b02a2c1a5e1c71a87c7ba145114e6e4b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4111923
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
We have ESBuild as a dep in two places:
1. `DEPS`, managed by gclient
2. `manage_node_deps.py`, managed by npm
These versions need to match, otherwise any builds that use `esbuild`
will fail in Chrome land. This CL introduces a script and PRESUBMIT
check to ensure that the two versions are in sync.
Bug: none
Change-Id: I7ea9172ae386e4e21e1ac82c208d171b65b29e22
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4067299
Reviewed-by: Liviu Rau <liviurau@google.com>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
This CL switches out the in-tree versions of en-US.json/en-XL.json
in favor of the versions generated at build time. They are identical.
The implementation is straight-forward. On the minification step, we
exclude the in-tree en-US.json/en-XL.json and instead add the
outputs of the "collect_strings" action (aka the generated en-US.json/
en-XL.json).
R=kimanh@chromium.org
Bug: 1185727
Change-Id: I923fba50033305a7df6bedccf65c657ecc8e5235
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4043247
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>