Commit Graph
1368 Commits
Author SHA1 Message Date
Jack Franklin 4f68dfdb98 Fix stylelint errors on border: usage with custom vars
Fixed: 1442257
Change-Id: Idbfab3c09655303ffd7e8ca383f87ec3cf89465b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4660608
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2023-07-03 10:57:30 +00:00
Hadrien Jaubert 158c1fc712 [Protocol Monitor] Change python script to create registerType
This CL adds the ability to have access to a map enabling the user to have access to all the keys of object parameters. To do that, this CL modifies code_generator_frontend.py to generate a new command called RegisterType.

DISABLE_THIRD_PARTY_CHECK=make build work

Bug: 1458788
Change-Id: I28bf0baf3841cf3120d103e40925698d3c8114b2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4650362
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
2023-06-29 10:17:47 +00:00
Simon Zünd 6947220e25 [build] Extend devtools_release_sourcemaps to ESBuild bundles
DevTools has two ways to build release builds:
  * tsc + rollup + terser
  * and esbuild.

THe GN arg "devtools_skip_typecheck" decides which of the two
toolchains is used, as the esbuild one is much faster and enough
for the average Chromium developer.

Until now, the "devtools_release_sourcemaps" only works with the
rollup toolchain. This CL implements sourcemaps also for esbuild.

This means that "devtools_release_sourcemaps" now works
independently of "devtools_skip_typecheck".

This is convinient for dogfooding our own source map support in
DevTools: Now we can test against both rollup and esbuild with
DevTools-on-DevTools.

R=jacktfranklin@chromium.org

Bug: 1430396
Change-Id: I54849764a26f3fb539535eccdde7a79f9fd00d5f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4654605
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-06-29 08:48:01 +00:00
Al Muthanna Athamina 21696bda6d Add shuffle option to e2e_divider
Bug: 1419802
Change-Id: I54d001c315633304623825331cbba540f1e0f064
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4647595
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2023-06-28 11:40:30 +00:00
Hadrien Jaubert cafa2786f7 [Protocol Monitor] Add support for array parameters
This CL adds the ability to edit array parameters in the Protocol Monitor. To do that, this CL modifies code_generator_frontend.py to  report the array as a parameter type. Runtime type checks in InspectorBackendCommands.js are modified to account for the new parameter type.

DISABLE_THIRD_PARTY_CHECK=needed to build correctly

Screenshot : https://bugs.chromium.org/p/chromium/issues/detail?id=1457512

Bug: 1457512
Change-Id: I368c0146975d95fa024d59f4fb3e7d4ab590722d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4640225
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Nancy Li <nancyly@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
2023-06-27 13:13:08 +00:00
Randolf Jung bcb3bc8d41 Update puppeteer and @puppeteer/replay
- puppeteer replaced with puppeteer-core (20.7.3). DevTools does not actually need puppeteer as it downloads the browsers on its own. PUPPETEER_SKIP_CHROMIUM_DOWNLOAD is not needed too.
- @puppeteer/replay upgraded to 2.11.2

DISABLE_THIRD_PARTY_CHECK=requires code updates for puppeteer-core
Bug: none
Change-Id: I173c228d766681a1a8a9ada3fcf17525cd191726
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4640022
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
2023-06-26 18:05:57 +00:00
Alex Rudenko 6a4b64d675 Remove special treatment for puppeteer by rollup
And by accident the special treatment for puppeteer-replay.

Fixed: 1455094
Change-Id: Ia80fbd62e5389133e7c38717365d772a94fb5585
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4637784
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-06-23 04:32:02 +00:00
Al Muthanna Athamina 8719882ebf Prettify local parallel E2E test results
Bug: 1419802
Change-Id: I98c10a89bfe9d1f9147474ab2ba3396acb92b483
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4628410
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2023-06-20 15:49:02 +00:00
Alex Rudenko a2f56b76eb Add replay lib to the roll script
Splitting from the roll CL: https://crrev.com/c/4614808

Bug: none
Change-Id: I02a789be0221dd850d806e1f874f4abdca2ce1a0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4626214
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-06-19 09:00:35 +00:00
Al Muthanna Athamina e234a4f9f6 Add scripts to split the e2e tests command and a local parallel runner
This adds two scripts: one that divides the E2E tests command into
multiple ones that can be run separately, and another script that runs
these commands in parallel Python processes. This will allow us to run
the E2E tests locally but it is also necessary for running tests in
parallel on the builders. We also remove skipOnParallel since it is
not needed anymore.

Bug: 1419802
Change-Id: I7e4c2a6f1847c3a63cab1cc2365ddaa69b77f2fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4543009
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
2023-06-14 10:40:19 +00:00
Ari Chivukula 9303e842f5 [Deprecations] Keep metadata after usage period has passed {devtools}
We need to retain the metadata for deprecations past the point where
they are no longer dispatched on stable. This provides a way to turn
codegen off at the same time as we note the milestone when the metadata
can be safely removed.

Bug: 1451772
Change-Id: I9fb9ef4b8fbecaa2fb8d14ad65016102387bf722
DISABLE_THIRD_PARTY_CHECK=Testing codegen changes
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4594037
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-06-07 08:31:19 +00:00
Jack Franklin b6e869c1ff Update @typescript-eslint/* deps
Following the update to TS 5.1.3, updating the ESLint plugins too.
Includes a couple of small fixes where more floating promises are now
detected.

DISABLE_THIRD_PARTY_CHECK=source file changes to fix issues

Bug: none
Change-Id: Ia4b346ded7a63abed3dfc08db5f7b15baf6a40c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4584591
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2023-06-02 14:33:49 +00:00
Jack Franklin 98d9d46d28 Upgrade TypeScript to 5.1.3
DISABLE_THIRD_PARTY_CHECK=TS upgrade and source code changes.

Bug: none
Change-Id: I21244e75a24e8e323ef40c696254e552f3956e6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4583215
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2023-06-02 13:05:48 +00:00
Jack Franklin dd7f433485 ESLint rule for tracking canvas contexts.
This CL introduces a basic ESLint rule for tracking the calls to
context.save and context.restore.

It does this by using two stacks, one to track scopes, and another to
track save() and restore() calls within those scopes. If when we exit a
scope we have an unbalanced stack of calls, we know the user has not
properly ensured that every save() call is restore()'d properly.

Bug: 1450569
Change-Id: I5d632a0e0cd17b6f755e3b725146314db408b3bd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4580487
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2023-06-02 10:56:17 +00:00
Jack Franklin 2f2b9fcb55 Fix overriding component server port with PORT variable
The logic for the PORT was slightly off, we need to make sure the PORT
variable is used before the logic for choosing a port based on tracing
mode.

Bug: none
Change-Id: Id512eb26f357096639a7b631521aae6c233ee81f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4566606
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2023-05-25 15:17:59 +00:00
Andrés Olivares 6c66158a5a Initialize the tracesMode flag in component server as false
This prevents a bug I noticed where a request for the index file
wouldn't be properly handled because it relies on the tracesMode being
`false`. In cases where the flag isn't set, this flag would be
`undefined`, which would cause an error (see line 249 in server.js).

Bug: none
Change-Id: I3c3fa538f61e46c1ac1fddb0f6f920264a562f04
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4547509
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Andres Olivares <andoli@chromium.org>
2023-05-22 10:57:29 +00:00
Paul Irish 7de493712a Introduce trace serving mode to component server
Provides an index of fixture traces, CORS serving, and the magic
loadTimelineFromURL url to develop against.

To run: node scripts/component_server/server.js --traces

Screenshot: https://imgur.com/Sh85xBx

Bug: 1430630
Change-Id: I9912dc6db21e43a5287fdda331d0d66aff1b01df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4545102
Commit-Queue: Paul Irish <paulirish@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2023-05-19 07:20:12 +00:00
Jack Franklin 16ecfae54b Allow assert.includeMembers() when testing arrays
Bug: none
Change-Id: Ie13fd2650f3e0993688d53b23bc1dded43c654e5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4547299
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2023-05-18 13:31:39 +00:00
Jack Franklin bb78b969f8 Fix ESLint test definitions rule for it()
It's annoying to be typing it() and then have the rule error in your
editor, so in that case let's just short-circuit and not attempt to lint
it.

Bug: none
Change-Id: Ia61cc17a7f69ddba07a5a4e2b5b64d9133c17f27
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4547298
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
2023-05-18 13:16:23 +00:00
Randolf Jung c866a154c3 Update DevTools symlink hook
- `ensure_symlink.py` now actually _ensures_ the symlink is correct.
 - `os.symlink` is supported in Windows since 3.8, so the compat function was removed.
 - Some debugging information has also been added w.r.t. the gclient hooks.
 - Some attributes in the gclient file are not relevant.

Bug: 1095624
Change-Id: I7272da7980a1706ee624362ec0d5a3f71f9a6f04
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4533035
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-05-16 13:53:27 +00:00
Randolf Jung 0849e8636c Update puppeteer to 20.1.2
Bug: none
Change-Id: Ic54abd3e326a08c473ee20245e62f84365036676
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4519845
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-05-10 13:31:14 +00:00
Alex Rudenko aaf6c64ae8 [Recorder] Move UI components
DISABLE_THIRD_PARTY_CHECK=touching OWNERS file via a dep CL and presubmit is not happy

Bug: chromium:1414773, chromium:1441801
Change-Id: I8bf27e4781be53486a51ec8890b0cf511ddba269
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4488030
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2023-05-03 12:11:28 +00:00
Alex Rudenko df848bd08e Fix platform check in checkGoldensForPlatform
There is a win in darwin.

Bug: 1440943
Change-Id: Ic9fa6cacc074d77be5bd5f58bed3359613d8c410
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4497908
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2023-05-02 09:05:55 +00:00
Randolf Jung 95337a1834 Update puppeteer to 19.11.1
Bug: none
Change-Id: I8cc107acb06ac82bb6c6b060c86a6346a09d464a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4475485
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Auto-Submit: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2023-04-25 16:12:28 +00:00
Alex Rudenko 09215f4648 Add node for arm64 to DEPS
sha1 taken from https://source.chromium.org/chromium/chromium/src/+/main:third_party/node/mac/node-darwin-arm64.tar.gz.sha1

DISABLE_THIRD_PARTY_CHECK=related changes
Bug: none
Change-Id: Ib3e7cbdb1604300277f481676f5ce5ca12ad534e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4436920
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-04-18 15:11:32 +00:00
Mathias Bynens 12708639c7 Remove custom escaping logic in favor of json.dumps
As of ES2019, JSON ⊂ ECMAScript [1], meaning we can use JSON
serialization to embed string literals into JavaScript programs.
This eliminates the need for any custom string escaping logic,
since we can simply use `json.dumps` now.

[1]: https://v8.dev/features/subsume-json

DISABLE_THIRD_PARTY_CHECK=added missing escaping to *.json5 file https://crrev.com/c/4401593

Bug: chromium:1411444
Change-Id: I9f0c5b2dfa218951bcb0d31432c9484666307f7d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4402896
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
2023-04-05 13:42:58 +00:00
Simon Zünd 3a67337d3a [build] Add source maps for release builds
This CL adds a new GN flag "devtools_release_sourcemaps" (off by
default.. When set, we'll instruct rollup to generate source maps for
the bundles. This means that every entrypoint, e.g. 'common.js', now
has a corresponding source map ('common.js.map').

We also use 'rollup-plugin-sourcemap'. It is responsible for consuming
the source maps generated by the TypeScript compiler and merge them
with the source map produced by rollup. This allows us to still
debug on the level of TypeScript files even for minified release
builds.

R=jacktfranklin@chromium.org

Fixed: 1430396
Change-Id: I3a0f94dc722f19d066725aef3544652c6a19c95a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4402891
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-04-05 08:02:45 +00:00
Wolfgang Beyer 742df2baba [DevToolsIcon] Make icon colors available in component docs
Update error icon in icon component component doc.

Screenshots: https://imgur.com/a/uglXcol

Bug: 1427397
Change-Id: I750b3906214a685881ee92f961ac9afa7f2d8f26
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4397716
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
2023-04-04 15:31:34 +00:00
Simon Zünd 1bd98ee250 [deps] Add 'rollup-plugin-sourcemaps' intended for release builds
We plan to enable source maps for release builds behind a GN flag. For
this to work rollup needs to consume the source maps already generated
by tsc and merge it with its own source map. Rollup can't do this
natively so this CL adds a plugin that can.

R=jacktfranklin@chromium.org

Bug: 1430396
Change-Id: Ibb38c7892326907431e54b7c7dbd7b912b59ccb9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4397707
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-04-04 13:31:33 +00:00
Randolf Jung b08370d389 Update puppeteer to 19.8.3
Bug: none
Change-Id: I415f90baf38a8b48751df16d6f7f374bcbab1865
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4394482
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
2023-04-03 09:36:19 +00:00
Randolf 554314669d Update puppeteer to 19.8.2
Bug: none
Change-Id: I96924a43c609487123c25470fde2fc2618d19e27
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4381385
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-03-30 06:02:42 +00:00
Eric Leese 24e060d262 Update icons for folders in source tree view
Screenshot: https://imgur.com/a/X7z3ChR

Bug: 1427397
Change-Id: Ie53888d7037ead04a6bfaf34569c2a55f93ccb5b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4370249
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2023-03-25 16:07:15 +00:00
Simon Zünd 0cc29a70d1 [deps] Update @types/codemirror for tsc 5.0 compatibility
DISABLE_THIRD_PARTY_CHECK=We need to remove a @ts-expect-error in the
formatter

Bug: 1412307
Change-Id: Ic130c0db4f879ec4e53b5ea31ba034aa880779a2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4358158
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2023-03-22 06:31:16 +00:00
Kateryna Prokopenko d43a916df8 [DevToolsIcons] Rename --color-primary to --color-primary-old
We want to introduce GM3 --color-primary to use in icons. Currently
there is a conflict with the already existing --color-primary.
At the moment we don't want to change the color everywhere, so we need
to rename the old one. Later we will get rid of the --color-primary-old.

Bug: 1210894
Change-Id: I2871b41a022f438f019ab75482f4444f541c5bcf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4353012
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2023-03-20 19:20:37 +00:00
Simon Zünd d04cab149b [typescript] Update tsc to 5.0.2
DISABLE_THIRD_PARTY_CHECK=Requires some changes to make tsc happy
R=jacktfranklin@chromium.org

Fixed: 1412307
Change-Id: Iee6ff440fdb346defa901435f490009f44a7a142
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4352530
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2023-03-20 10:01:07 +00:00
Andrés Olivares 10417e7ccb Export merged results of unit and interaction test coverage as text file
For convenience, since the bots will still use the JSON file.

Also, an option to define the folders on which coverage will be
calculated is added to the interaction tests. The flag works
identically to the COVERAGE_FOLDERS of unit tests, i.e. a pattern is
provided to define the included folders. For example: the flag can be
set like COVERAGE_FOLDERS=
front_end/{models/trace,models/timeline_model,panels/timeline}

These two changes should help to calculate the total OPP coverage in
go/opp-test-coverage

Bug: 1424729
Change-Id: Ie982f62dfac0014c05075e53173a8e7710d3b9e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4345493
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2023-03-20 09:39:59 +00:00
Simon Zünd 6afdfa1e51 [deps] Use Chromium's node binary instead of the DevTools one
Currently roll_deps.py only works in a standalone DevTools checkout.
That is because we resolve the Node.js binary in the DevTools
directory. In a Chromium checkout that binary does not exist as
we don't do transitive deps for `gclient sync`.

This CL changes roll_deps.py to use the Node.js binary of the
Chromium repository instead. It's guarnateed to be there since we
run `gclient sync` in the Chromium directory as part of the script.

So now the script works both with a standalone and an integrated
checkout.

R=alexrudenko@chromium.org

Bug: None
Change-Id: I39e7f0d27dad1d1c820ebeb9261619b57a65ae0f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4341504
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-03-16 10:47:39 +00:00
Al Muthanna Athamina bdc5f4027c Add skipOnParallel to it and invert flag
With skipOnParallel we can skip tests when running in parallel and run
them separately in a sequential way with fgrep. We also added the
invert flag (which allows us to invert fgrep) in case we need it in
the future.

Bug: 1419802
Change-Id: I2cd479f476b0c3ef2b0c204d49bdd9da535397a9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4315959
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Adam Raine <asraine@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
2023-03-13 15:04:14 +00:00
Liviu Rau d1a36c004c Start old CLI tool deprecation
We start deprecating the old 2 steps process (trigger & update) for screenshot testing golden updates. The old CLI tool is still a dependency for other projects.

Bug: chromium:1413723
Change-Id: Idcd0e415c6b41ab6591d49bd5e26123c5ca22ce3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4314919
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
2023-03-09 19:12:52 +00:00
Liviu Rau 3925b7d736 Collect screenshots from mac
Bug: chromium:1413723
Change-Id: Ib3e68936bc41023f0169e5c315b66a4c54325683
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4315942
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2023-03-08 11:39:22 +00:00
Randolf b0fe9c160b Update puppeteer to 19.7.3
Bug: none
Change-Id: I7e8ef149b66c6376ee728df1ee4b7c8c14803a78
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4311823
Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
2023-03-06 20:09:06 +00:00
Liviu Rau 005e716799 Update screenshots directly from failing CQ builders
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>
2023-03-06 16:48:38 +00:00
Philip Pfaffe 75e3ab637d Fix debug-test script and add it to workflow docs
Bug: none
Change-Id: Ie09da21bc697643f3b62e52c27310f8af4a5e38f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4294987
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
2023-03-01 12:17:55 +00:00
Al Muthanna Athamina 40d1b8a912 Add parallel execution command for E2E testing
Bug: none
Change-Id: Id5a960dfb19aa3629a44f8d4a5e874551cf2e1b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4274348
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Liviu Rau <liviurau@google.com>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2023-02-23 10:57:26 +00:00
Liviu Rau 5d2ee7226b Support custom platform names
The platform name `win64` is tight to infra/config branch and hard to modify to `win`, as it is by default in the other projects. As a followup cleanup I will reverse the default to `win64` and update the other projects.

Bug: chromium:1413723
Change-Id: I5359b74c224d00e1bf05d7f694af4669bdd63984
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4282201
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2023-02-23 09:29:58 +00:00
Jack Franklin 1a8d0b7d88 Make no_only_eslint_tests autofixable
Small annoyance I wanted to fix :). For clarity, this only applies to
the use of `only: true` in ESLint tests

Bug: none
Change-Id: I9393784dfd7ec4163a4fc9714714b5eb8cb74ee9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4280824
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2023-02-22 15:40:27 +00:00
Jack Franklin 677c2657d0 Make eslint no_only rule autofixable
It has annoyed me for a while that I have to manually do this, with this
change it will be done automatically when running ESLint with fixes
turned on.

Bug: none
Change-Id: I7afc47bf9d28f85ca8d48e3c33e2448346812a07
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4280822
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-02-22 14:42:55 +00:00
Jack Franklin 84f48b20ac Fix false positive in enforce_custom_event_names lint rule
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>
2023-02-17 11:42:58 +00:00
Jack Franklin c8db49a9f2 Add ConstructedEvent and PayloadEvent to TracingModel
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>
2023-02-16 13:24:01 +00:00
Jack Franklin 145cf30076 Fix ESLint custom names not respecting custom Event class
This ESLint rule assumes that if a class extends an Event class, it is
extending the built in class and applies checks accordingly. However, if
we are in code that has a local Event class defined, then we should not
apply this check.

Bug: none
Change-Id: I1ce94299074c44812fd2845fe7e487a2c14b140c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4259791
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2023-02-16 12:54:27 +00:00