Nikolay Vitkov
4eac8f8231
[eslint] Run type checking on custom rules
...
Currently behind a flag, as there are a lot of error.
This CL fixes some of them.
Bug: 407085691
Change-Id: I736472ff5a9d8c46e45a1ce89a42199774d9075f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6410471
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Danil Somsikov <dsv@chromium.org >
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
2025-03-28 16:08:54 -07:00
Nikolay Vitkov
7099949310
[cleanup] Fix yargs type
...
Uses ParseSync else the result is Promise<T> | T.
This give IDE better types to work with.
Bug: none
Change-Id: I4d6014aeccd7428ec03bfde90c5d728c6182c1f7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6387381
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2025-03-25 06:21:49 -07:00
Nikolay Vitkov
afc8a8cec8
[eslint] Include ExtensionAPI
...
This makes all current files under DevTools lintable with EsLint
by default.
Also remove the rule for default export for configs.
Bug: 397260638
Change-Id: I3b380ad4351eb53c65207b242d7f8221e7788e48
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6357121
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
2025-03-17 03:48:33 -07:00
Alex Rudenko
feb21f6438
Add assertScreenshot to unit tests
...
This CL adds a custom browser wrapper that starts the browser using
Puppeteer instead of letting Karma to directly start the browser. The
wrapper also exposes a binding that allows the test code to capture a
screenshot of the test DOM. The helper reuses existing screenshot
assertions and reports the result back to the test code.
This CL also adds args to improve stability of screenshots and
fixes the font to be a Roboto font loaded from Google Fonts.
To test: `npm run test --
front_end/panels/ai_assistance/components/UserActionRow.test.ts`
Bug: 401489541
Change-Id: I04889d0f0caa5c468fd35f98c66b0e6ac393de18
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6330749
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org >
Commit-Queue: Danil Somsikov <dsv@chromium.org >
Reviewed-by: Danil Somsikov <dsv@chromium.org >
2025-03-14 11:32:55 -07:00
Nikolay Vitkov
4dc470bc32
[eslint] Fix when running with .
...
Fixes some issue around what gets ignored when linting.
Found while running `npm run lint -- .`
Bug: 397260638
Change-Id: I858b9078611a3cb9f31c60ff3e18d99b56563d73
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6280813
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org >
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2025-02-20 05:59:37 -08:00
Nikolay Vitkov
aee920d20b
[lint] Add debug logging
...
Bug: none
Change-Id: Ifcca54e5a5330d6e8f745b9a7eb0a30212360d8e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6239894
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
2025-02-06 09:46:26 -08:00
Nikolay Vitkov
da9a885290
[lint] Add debugging flag
...
Was messing around with creating rules for Lit formatting,
and discovered that if not disable the second run
does not run the custom rule.
Bug: none
Change-Id: I1cc38d1118560774527dfe52d5d1281e304491ad
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6216936
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
2025-02-03 02:31:56 -08:00
Nikolay Vitkov
41c69115b8
[eslint] Enable import/sort rule
...
This provides consistency of how imports are order,
reducing differences in authored files.
Bug: none
Change-Id: I45ddd71e3e0004aca32f101cb926101544a34157
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6218490
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
2025-01-31 07:48:10 -08:00
Nikolay Vitkov
5b2bcff17f
[lint] Improvements and fixes to linting
...
Rerun all files if `lit-analyzer` rules change. Add support for EsLint
cache - `npm run lint` delta first run vs second of over 2 min. Don't
run EsLint if all files are ignored.
Bug: none
Change-Id: I042ede01cf0fe6de63b066723e1dc61cae3f9dcc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6213930
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2025-01-29 21:21:13 -08:00
Benedikt Meurer
da8d124d10
Merge inspectorSyntaxHighlight.css and inspectorCommon.css.
...
Eventually we will need to split up the `inspectorCommon.css` styles
into separate style sheets and be more explicit about their usage,
but that's a bigger undertaking, and not something to start today.
Bug: 391381439
Change-Id: Ib075553b808257d1ef72d1abdb981221b8f19b93
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6189458
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
2025-01-22 06:53:00 -08:00
Nikolay Vitkov
2205050d6a
[eslint] Add extensions folder to linting
...
Includes linting of the extensions folder.
Also add .mjs files to the PRESUBMIT which was previously missing.
Bug: none
Change-Id: I6ae5bb8a218461c3b2bf07d95310d79c57f2cdd9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6177277
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
2025-01-21 04:58:17 -08:00
Nikolay Vitkov
de07efad99
[eslint] Update lint to include .mjs files
...
EsLint support .mjs file by default now. But we exclude them from
running previously in our script.
Disabled the `es-modules-import` rule for our script folder
as it's not relevant there.
Added types comment to the EsLint rules.
This should make it easier to build and understand the current rules.
Bug: none
Change-Id: I448efdb055c9cc107e3bced9b3febe5eb226bcf6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6177719
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
2025-01-17 06:45:29 -08:00
Nikolay Vitkov
b4e8dc7ac2
Update EsLint v9
...
Bug: none
Change-Id: Iebcc53c0f70a51242f22e4df167cd588b08cefcd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6140633
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
2025-01-07 05:41:31 -08:00
Nikolay Vitkov
2a1b3b34b1
Update StyleLint to v16
...
Stylelint v16 deprecated CJS so I moved our lint script to ESM,
and fixed all the deprecation warning.
The only place I needed to silence them were tests,
as we import CJS there.
Bug: none
Change-Id: Iae4d2df76c855a9738b774a2d035f22509770215
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6138610
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
2025-01-03 02:57:06 -08:00
Nikolay Vitkov
55adf677d3
[eslint] Migrate to Flat config
...
A necessary step to adopt EsLint v9.
More can be read at - https://eslint.org/blog/2022/08/new-config-system-part-2/
In short - only a single configuration is used a cross the whole repo.
Bug: none
Change-Id: I74cd613fba25b94cee92e4b7c1b525471bcbe44b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6059264
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
2025-01-02 04:58:36 -08:00
Nikolay Vitkov
04cca9f499
[cleanup] Remove dead code
...
Reland of https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6070376
Now that devtools-frontend is merged directly into chromium,
we can safely remove this.
Bug: none
Change-Id: I882e3f58a71eab50485eb0ef23b398154d784531
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110744
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
2025-01-02 04:29:39 -08:00
Benedikt Meurer
586a9a5908
[eslint] Adopt ESLint Rule Naming Conventions.
...
Update our custom ESLint rules to follow the official naming
conventions[^1], in particular the rule names need to
1. consistently use dashes to separate words (rather a mix of
underscores and dashes), and
1. consistently use `no-` prefix for rules that disallow something.
Drive-by-fix: Also remove the `fixable` setting from rules that don't
provide a fix.
This is a functionally neutral change.
[^1]: https://eslint.org/docs/latest/contribute/core-rules#rule-naming-conventions
Fixed: 386319581
Change-Id: Ifcb6c0e4ca8334a263be6534596c30b3bcca243b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110726
Reviewed-by: Samiya Caur <samiyac@chromium.org >
Commit-Queue: Samiya Caur <samiyac@chromium.org >
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org >
2024-12-27 02:54:56 -08:00
Alex Rudenko
789751e321
Revert "[cleanup] Remove dead code"
...
This reverts commit 26bc275ce1 .
Reason for revert: used in devtools-internal so breaks the roll
Original change's description:
> [cleanup] Remove dead code
>
> The infra now all uses `npm run lint` for linting.
> Moves a common function to the only place it's used.
>
> Bug: none
> Change-Id: Ibcf86daa95e33d8b313efe76a6173436769786d5
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6070376
> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
> Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Bug: none
Change-Id: I090c1750ec1ada53df22c443253922162f41e271
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6072803
Reviewed-by: Simon Zünd <szuend@chromium.org >
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
2024-12-05 07:06:18 +00:00
Nikolay Vitkov
26bc275ce1
[cleanup] Remove dead code
...
The infra now all uses `npm run lint` for linting.
Moves a common function to the only place it's used.
Bug: none
Change-Id: Ibcf86daa95e33d8b313efe76a6173436769786d5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6070376
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
2024-12-04 15:44:37 +00:00
Nikolay Vitkov
cd5440fbdc
[lint] Fix Stylelint not running
...
Node syncSpawn can be promisified, and never runs the following
scripts, but it somehow closes the process afterwards.
Marking no presubmit as it fails on windows if you change lint rules
No-Presubmit: true
Bug: none
Change-Id: I08fdc3174fe542a5f824239b085d3433e5a24573
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5999261
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2024-11-06 15:43:19 +00:00
Benedikt Meurer
0d4dbaeca9
[lint] Read lit-analyzer options from toplevel tsconfig.json.
...
This way the config is in a central place and can be reused for
ts-lit-plugin.
Bug: 375149136
Change-Id: Ic3805b059b5c9b0d103a152e1ff36b3c9c5245b6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5953717
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Danil Somsikov <dsv@chromium.org >
2024-10-23 14:10:30 +00:00
Nikolay Vitkov
60a23c771c
[Lint] Fix issue with window
...
Windows max line argument is around 8000, if you pass that the command
will fail, we need to split the LitAnalyzer files when we spawn it.
No-Presubmit: true
Bug: none
Change-Id: I68dd71228b02a8ae01555b23a229f5fcc69b2a11
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5923563
Reviewed-by: Danil Somsikov <dsv@chromium.org >
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
2024-10-15 11:11:02 +00:00
Danil Somsikov
29e865259c
Report lit-analyzer status correctly so that it can break presubmit
...
No-Presubmit: true
Bug: none
Change-Id: I1d360f85a3551e6d9d28030007e502d5ce204d83
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5920706
Auto-Submit: Danil Somsikov <dsv@chromium.org >
Commit-Queue: Danil Somsikov <dsv@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
2024-10-10 10:21:05 +00:00
Danil Somsikov
058b9d879d
Add lit-analyzer and run it as a part of lint check
...
Bug: 370734442
No-Presubmit: true
Change-Id: I7021b801e5bacd4ed33643651a53b8db20ccf8b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5898986
Commit-Queue: Danil Somsikov <dsv@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2024-10-07 12:41:05 +00:00
Nikolay Vitkov
0ceb32a42f
Fix lint rule for multiline props
...
In some cases the formatter won't complain about the multiline cases,
but this rule won't pick it up correctly erroring as the `.exec`
returns `null`, fixed with a check.
Also update the RegEx to support multiline CSS and parse them
accordingly.
Bug: none
Change-Id: Ie961e66fce1ff517605d98a14c71086612e61692
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5891590
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
2024-09-26 08:54:41 +00:00
Alex Rudenko
cb4b9688d4
Remove coverage
...
Infra change: https://chromium-review.googlesource.com/c/chromium/tools/build/+/5833493
Bug: 364237269
Change-Id: Iebc847a3a3644b5538771b94128943da588910a7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5830445
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
2024-09-05 11:38:42 +00:00
Nikolay Vitkov
47310242ac
[Cleanup] Enable EsLint quote-props
...
Enable a EsLint rule to enforce code-style
Bug: none
Change-Id: I4fa6d09a744999dc2967fe989a2339423bb78c86
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5833497
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org >
2024-09-04 11:57:11 +00:00
Benedikt Meurer
e6a39dc688
[scripts] Provide a single npm run lint command.
...
This unifies the current set of two dedicated scripts for running ESLint
and stylelint into a single script, with a single npm run-script
command. We need to migrate the Infra and devtools-internal before we
can fully remove the old scripts.
Bug: 360832181
Change-Id: Ifb98d882d951fb3e1c9d7ff8aae22c8d844ced55
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5796886
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org >
2024-08-19 16:04:20 +00:00
Philip Pfaffe
9d80aef256
[testing] Delete obsolete runners
...
Fixed: 333423685
Change-Id: I5eb0ff36ee81fad3c50ba96b3a79d1f7296df5d3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5563425
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org >
2024-07-09 18:09:36 +00:00
Philip Pfaffe
d522f860b0
[cxx] Use new test driver infrastructure for the cxx debugging extension
...
This lets us remove a test runner.
Drive-by: Remove goma-related flags.
Bug: b:333423685
Change-Id: I104113dc3b49ab34e13c8abe83d9c2994345c04e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5465640
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org >
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org >
2024-04-18 14:20:44 +00:00
Philip Pfaffe
ce5afc0d07
[testing] Use fixed paths to refer to snapshots/screenshots
...
This avoid special casing and passing golden locations around. In order to nicely reference snapshots, we move them next to the test files since snapshots are looked up by test name anyways.
Bug: b:333423685
Change-Id: I02188633f25dffe8f863d64b1e769cbb5563b2b6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5435761
Reviewed-by: Simon Zünd <szuend@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org >
2024-04-10 13:49:46 +00:00
Simon Zünd
8a6fb2f6f5
[unittest] Also set LPAC ACLs on win when running unit tests
...
The CL https://crrev.com/c/5330806 sets the ACL when downloading the
CfT binary during "gclient sync". This is not sufficient for our
CI bots as the unit test suite is run on swarming where the relevant
files are just copied over.
To fix these sporadic failures we'll also set the ACL on windows
as part of `run_unittests.py`.
R=pfaffe@chromium.org
No-Tree-Checks: true
Bug: 324929074
Change-Id: I200b78a2ed1f31ffa24a696266e508a4deabc808
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5371760
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
2024-03-14 09:26:31 +00:00
Eric Leese
5377e0bbb2
Don't print screenshots to console, fix retry hook
...
This makes several improvements to test output:
- Screenshots are no longer printed to console or saved to
an html file. This is unnecessary now that they are uploaded
to rdb.
- When a test is retried, the timeout hook was not correctly
hooked, which produced unexpected errors from multiple done
calls. This has been fixed.
- Screenshot error message now includes causes, which displays
the pending async stacks on timeout.
- Driveby fix to improper assertion in console-helpers.
Bug: None
Change-Id: Ia76f88ad9fbf1236a47a1f27eff41ee93d1a28a5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5349145
Commit-Queue: Eric Leese <leese@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
2024-03-07 09:58:52 +00:00
Benedikt Meurer
40fdfc4c61
[test] Remove the test/unittests/ folder completely.
...
Move the last bits from the old tree structure and don't use the
`test/unittests/` folder from now on.
Fixed: b:325903709, b:323795674
Doc: http://go/chrome-devtools:move-unit-tests-design
Change-Id: I47d727348d115d07f6b04b818359940c4361109a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5332214
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2024-02-29 14:45:25 +00:00
Liviu Rau
5006f06090
Select which tests to run via regex
...
Bug: b/41494239
Change-Id: Ibeea0b48bb5d8a629f134d76a629464076cc0c20
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5286035
Reviewed-by: Mathias Bynens <mathias@chromium.org >
Commit-Queue: Liviu Rau <liviurau@google.com >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2024-02-13 08:29:07 +00:00
Andrés Olivares
f249e0394c
Use --swarming-output-file when running performance tests
...
To ensure the output file is copied to the swarming bot.
Bug: 1504824
Change-Id: Id1a69ecef88b59b12cd5a452b4c546b90852fc06
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5062978
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Andres Olivares <andoli@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2023-11-28 17:31:23 +00:00
Ergun Erdogmus
6c326da0de
[Watch build] Enable running unit tests on file change
...
The part that takes a lot of time in running unit tests is actually
spinning up the browser and connecting to it.
`watch-unittests` command starts the file watcher for Karma
test runner which runs the tests on file change.
You can use this without `watch` script and by just rebuilding
the target.
When combined with `watch` command, this enables you to run unit tests
instantly after a file change.
Bug: none
Change-Id: Icd71230b5b455254dc25b4cef5f6ae72c5dbba06
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5012787
Commit-Queue: Simon Zünd <szuend@chromium.org >
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2023-11-09 06:50:15 +00:00
Jack Franklin
0dda490e7c
RPP: Remove ThreadTracksSource.BOTH_ENGINEs and update screenshots
...
This is the first in a long set of CLs that will begin to remove old
engine functionality we do not need.
I have started with the ThreadTracksSource enum and removed the
BOTH_ENGINES flag; updating all the screenshot tests to use the new
engine exclusively. In future CLs I will remove the enum and the flag
entirely, but first I will go through and remove code that only runs for
the OLD_ENGINE flag.
Bug: 1499182
Change-Id: I7ab164e500576d044f334705d5e99649b3523e94
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5002389
Reviewed-by: Andres Olivares <andoli@chromium.org >
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Andres Olivares <andoli@chromium.org >
2023-11-03 15:37:28 +00:00
Alex Rudenko
f7ea7ab986
Update pptr to 21.4.1
...
DISABLE_THIRD_PARTY_CHECK=roll of Puppeteer and removal of the Puppeteer flag.
Fixed: 1484476
Change-Id: I98425afe43878948983dba94bda362aa6681d603
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4968458
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2023-10-24 10:11:59 +00:00
Alex Rudenko
6d5f492d37
Enable Tab target for Puppeteer
...
This CL changes the Puppeteer instance used by the e2e and interaction tests to work in the Tab target mode, that is the mode that supports MPArch and features like pre-rendering. In the next releases of Puppeteer it will be enabled by default and this configuration can be removed.
Bug: chromium:1484476
Change-Id: I771234935a1d95de143a6c4559aa297d7dd1b4ae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4853353
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org >
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2023-10-05 07:29:26 +00:00
Al Muthanna
8416b07f3b
Add shuffling flag to unit tests
...
Bug: None
Change-Id: If2acf7173021fec2c2e54fe4563097bd182a65d2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4892396
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org >
Reviewed-by: Danil Somsikov <dsv@chromium.org >
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org >
2023-09-29 10:53:36 +00:00
Al Muthanna Athamina
34b5ae61b2
Add assertion for long commands on Windows for e2e_divider
...
Bug: 1419802
Change-Id: Ie80a84d34e0a249d625cae477475f35bfe81d2a0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4765266
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org >
2023-08-09 09:48:45 +00:00
Al Muthanna Athamina
9d12cee0c2
Address nits on e2e_divider
...
Bug: 1419802
Change-Id: Ia8d31372b02205d335295f4b8f3f0704d0330cab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4759305
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org >
2023-08-09 09:17:58 +00:00
Al Muthanna Athamina
d76e665871
Divide E2E test files by chunks instead of modulo
...
Bug: 1419802
Change-Id: Iac60d44814a43ba9b7dafa4a20377bc10c757950
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4755908
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org >
Reviewed-by: Liviu Rau <liviurau@google.com >
Reviewed-by: Liviu Rau <liviurau@chromium.org >
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org >
2023-08-07 13:58:57 +00:00
Jack Franklin
2662479c79
Enable npm run auto-e2etest to take a target
...
This CL updates the run_test_suite.js script to support the --autoninja
flag alongside --target, in which case it will do a build before running
the tests.
Unfortunately I had to duplicate the package.json entry, else we get
into a world of confusion with passing command flags through npm run
commands, and I couldn't get it to work.
Bug: none
Change-Id: I0a339c72cf41a4ffcb0241e8b3efb1b35b2e5a9f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4684353
Reviewed-by: Andres Olivares <andoli@chromium.org >
Commit-Queue: Andres Olivares <andoli@chromium.org >
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org >
2023-07-14 12:22:49 +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
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
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
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
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