Commit Graph
1484 Commits
Author SHA1 Message Date
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 52096b92dc [testing] Run ninja in run_on_target if the script does not exist
This simplifies bootstrapping scripts that themselves run autoninja, but
can only do so if they were compiled before.

Bug: b:333423685
Change-Id: If3689ec50e5e0e256d16f942a8017685789bdcca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5454292
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2024-04-17 10:15:30 +00:00
Alex Rudenko 2e1b8abf93 Simplify manage_node_deps.py
This CL simplifies manage node deps.py by
moving preferences to npmrc and removing
custom command support that is not documented.

Bug: none
Change-Id: I155fb8ca84deea883a03175f2bc6000cd6a9ad14
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5458177
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2024-04-17 07:32:39 +00:00
Philip Pfaffe 7d540a0ec9 [testing] Do not rely on test runner config in sources-helpers
Drive-by: disable --help and --version in run_on_target

Bug: b:333423685
Change-Id: If48c71b9378c5d60229fdfccaa4775a0a11b09a3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5454271
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2024-04-16 05:18:32 +00:00
Philip Pfaffe 705cfde469 [testing] Run interactions tests with a unified test runner
Bug: b:333423685
Change-Id: Ibbde7fe953dbcd1350c8fe3011d43063ea69c1d1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5435762
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2024-04-11 10:29:41 +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
Alex Rudenko 7042abca0b Update mocha to 9.2.2
- fixes a vulnerable dependency
- sorts devDependencies in asc order (done by npm)
- manage_node_deps should --save-exact version by default

Fixed: 333413840
Change-Id: Iaa670259db9771dab89c72214c17d0420e02eaa3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5439476
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2024-04-10 05:58:47 +00:00
Paul Irish a4fc921e3d Watch build: Compile node test files as CJS
node_ts_library outputs CJS, and is used by all .ts files within test/
This CL allows watch_build to correctly build them.

In the future, we could use `gn desc` to resolve these conditionals for
us. Alternatively, we could just improve the speed of regular
incremental builds.

Bug:none
Change-Id: I1111e13368beb38c80d1b25091c98ec47b685fae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5403346
Auto-Submit: Paul Irish <paulirish@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-04-09 04:42:36 +00:00
Alex Rudenko 2e05f8f1b9 Move devDependencies to package.json
it gives the following benefits:

- go/sk-npm-audit-mirror can perform periodic audits for repo
and auto-file bugs.
- Dev dependencies are declared in a typical location for npm projects.
- allows simplifying manage_node_deps.py the installation by running one `npm install` instead of installing packages one by one.

Bug: chromium:331331303
Change-Id: I7a5486acb89e174be5277c7696cb287a668d2ed7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5423233
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-04-05 06:22:21 +00:00
Jiacheng Guo c3f4bcd032 EarlyHints: Show early hints headers in the request headers
The CL handles the optional early hints headers from the browser and
shows them in the request headers panel.

DISABLE_THIRD_PARTY_CHECK=Update protocol

Bug: 40222701
Change-Id: I79ce7441a48f23d41cdaf22b0d62cb9ecb36477a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5367623
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Jiacheng Guo <gjc@google.com>
2024-04-05 06:19:12 +00:00
Benedikt Meurer 4941b552a9 [cleanup] Move separated UI utils back into UIUtils.ts.
During the ESM migration, some UI utils were moved out of UIUtils.ts (as
part of https://crrev.com/c/1967134), but there's no advantage/reason
for why this is beneficial. And now it's blocking the removal of the
`__widget` and `__widgetCounter` properties, because some of the
separated UI utils implicitly depend on Widget.ts, but without properly
importing anything from Widget.ts, and they get away with it because of
the use of `any`.

Bug: 332815658
Change-Id: I52742d10d6b0e4aba02b6a055b5c55c51c920023
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5419445
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2024-04-04 09:26:48 +00:00
Kateryna Prokopenko b63b015fbd Add part of Material design tokens
Bug:none
Change-Id: Iebf1a6a5190df67bea3c3dbda25c28718a111510
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5366404
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Auto-Submit: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2024-03-18 14:44:21 +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
Simon Zünd 5c0e0d8abb [deps] Upgrade TypeScript from 5.2.2 to 5.4.2
DISABLE_THIRD_PARTY_CHECK=Requires fixing up front_end files
R=alexrudenko@chromium.org

Bug: None
Change-Id: If7cd9777abc1daf8af48cf006576e39d5d57ce94
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5365623
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2024-03-12 12:35:14 +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
Alex Rudenko 19c832a558 Fix tooling to pick up transitive dependencies
Bug: none
Change-Id: Ifc98fc5a9e40c2090f497e856bf978d76f93fb53
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5349136
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-03-06 13:05:13 +00:00
Danil Somsikov 45f6ad10a0 [ve] Use button element instead of span to handle keyboard automatically
Bug: chromium:1467464
Change-Id: Icd8657299d87c0f4cc6c0f08123a4103975399b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5339956
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2024-03-06 07:08:18 +00:00
Paul Irish 73829c78c0 [Watch] Support multiple simultaneous file changes
If you change multiple files at once (git checkout, git restore, etc),
the current watch_build only recompiles the first. This CL introduces
debouncing to collect all changed files.

Also, if a ninja rebuild is needed, now we skip over the TS/CSS
rebuilds.

Bug:none
Change-Id: Ic9df97ca5c286453480c057a232720c0fc866630
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5337249
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Paul Irish <paulirish@chromium.org>
2024-03-04 10:17:16 +00:00
Simon Zünd d03865b108 Revert "Add @webgpu/types"
This reverts commit 067c706e79.

Reason for revert: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5076956
is abandoned

DISABLE_THIRD_PARTY_CHECK=Has ts_library.py change

Original change's description:
> Add @webgpu/types
>
> DISABLE_THIRD_PARTY_CHECK=Add @webgpu/types
> No-Presubmit: true
> Bug: 1506431
> Change-Id: I06f8d3758110f19298965e84e15f33c02bf4fbda
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5081999
> Commit-Queue: Fr <beaufort.francois@gmail.com>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

No-Presubmit: true
Bug: 1506431
Change-Id: Id19766f75d97b8339058fb51693747a47a4b6312
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5335357
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2024-03-04 08:12:37 +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
Andrés Olivares 294a584948 Move test/unittests/fixtures/ content to front_end/timeline/fixtures
This folder only contains traces atm and since the unittests/ folder is
going away we can move its content to the only panel that uses it.

Bug: 323795674
Change-Id: I245e1bf2964ff2283c47adf3866b98d2e8e21e37
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5330907
Reviewed-by: Nancy Li <nancyly@chromium.org>
Auto-Submit: Andres Olivares <andoli@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2024-02-29 08:15:25 +00:00
Simon Zünd 4df6525013 [deps] Set LPAC ACLs on windows for CfT binary
In some cases, windows bots don't have permission to run the CfT
binary due to missing ACLs.

Chromium tests usually set this ACL on the out/ directory when
building. For us it's enough to set up the ACL when we download the
CfT binary.

Manually verified on a Windows cloudtop that ACLs are correctly in
place after downloading a fresh binary.

R=mathias@chromium.org

Fixed: 324929074
Change-Id: Ieb5cb18ff883c1ee305be9738c725c3ebca00262
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5330806
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2024-02-28 09:07:17 +00:00
Alex Rudenko d04dd4506b [test] Update Puppeteer to v22.3.0
Drive-by: remove @puppeteer/replay that is not used in tests
Bug: none
Change-Id: I512794442c43cddd8a40b7816d3fc31f398251d2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5318365
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2024-02-27 09:00:14 +00:00
Benedikt Meurer d1f04bfb0f [test] Also move test helpers from test/unittests/.
This moves the helpers to `testing/` subdirectories, consistent with the
TS/JS Style Guide[^1].

[^1]: http://go/tsjs-style#test-file-names

DISABLE_THIRD_PARTY_CHECK=Moving unit tests.

Bug: 325903709
Change-Id: I5b82c1b00f724776e06f1675eae9c19ff1b4ba7c
Doc: http://go/chrome-devtools:move-unit-tests-design
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5317645
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2024-02-26 15:55:38 +00:00
Benedikt Meurer 98daa89b1c [cleanup] Remove Platform.DCHECK.
This was originally introduced with https://crrev.com/c/2894390 but we
never started using it consistently. It also comes with the downside
that unlike in Chromium, for DevTools debug builds aren't used as
extensively and frequently, so it's better to stick to either throwing
an Error or console.assert() for the few cases where we used the
DCHECK() function in the past, and thereby ensure that we are notified
of the problems early on.

Bug: none
Change-Id: I90bd465d088be5530530027ea1dbd0ec2b74b12b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5319500
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2024-02-23 11:28:03 +00:00
Benedikt Meurer 867e9ab1d7 [eslint] Remove const_enum rule.
Following up on https://crrev.com/c/5222921 we use the `const_enum` rule
anymore and we can thus delete the relevant files.

Bug: b:319814509
Change-Id: Iea1fa3bfb45e7625a0b50d30d248d79633cb968b
Doc: http://go/chrome-devtools:eslint-pain-points-design
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5314344
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-02-22 06:12:08 +00:00
Benedikt Meurer cb7952fda5 [eslint] Enforce stricter rules for mocha tests.
- Disallow passing async callbacks to describe, as that's a great source
  of bugs (anything defined after an `await` will not run).
- Disallow global tests.
- Disallow nested tests, as those will not run (and we had a few of
  them).

Drive-by-fix: Use the proper mocha/no-exclusive-tests plugin instead of
our homegrown one, and teach the mocha plugin about the various describe
versions (which consistently works for all the other mocha eslint rules
then as well).

Bug: b:319814509, b:326206427
Change-Id: Icfa9caf468882a226a5dbdd3be27b0f66fe4479f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5309877
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2024-02-21 14:00:27 +00:00
Benedikt Meurer 00dd2992ab [eslint] Ensure that *.test.ts files only import module entrypoints.
For `foo/Bar.test.ts` we cannot allow `import {Baz} from './baz.ts'`,
but we need to enforce `import * as Foo from './foo.ts'` to not break
with the module system in Release builds.

Bug: b:325903709, b:323795674
Change-Id: Ibd41dea9e660289508202efbb9c30808c6461dd4
Doc: http://go/chrome-devtools:move-unit-tests-design
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5308068
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2024-02-20 14:04:26 +00:00
Benedikt Meurer d87daa6fba [cleanup] Remove unnecessary defineComponent() helper.
The helper was originally introduced with https://crrev.com/c/2878729 in
order to prevent accidental duplicate registrations, but that is not an
actual problem in practice. On the flip side the helper adds unnecessary
noise (both in terms of readability/familiarity and in terms of
additional pragmas to disable the relevant ESLint rule). And
additionally Open Web Component tooling[^1] doesn't understand the
helper, and cannot infer Web Component information for our code
correctly.

Given the downsides (and basically no upsides) and the fact that we are
actively exploring the idea of adopting more of open-wc, we'll drop the
helper and its eslint here.

[^1]: https://open-wc.org/guides/tools/web-component-devtools/

Doc: http://go/chrome-devtools:eslint-pain-points-design
Bug: b:319814509, chromium:1205825
Change-Id: If888be52c94d97f09662543fbf604f8dfe1eb575
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5308066
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2024-02-20 11:53:37 +00:00
Benedikt Meurer 827440771b [test] Put front_end/models/ unit tests next to the source code.
DISABLE_THIRD_PARTY_CHECK=Moving unit tests.

Bug: b:325903709, b:323795674
Change-Id: Ied7584d269787294dd7cbc80faeaf33eed49ca67
Doc: http://go/chrome-devtools:move-unit-tests-design
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5308063
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-02-20 08:38:56 +00:00
Benedikt Meurer 31f96c021b [eslint] Remove support for *-legacy.ts entrypoints.
Bug: chromium:1442410, b:325903709
Change-Id: I176cc8e06f18a237c5c2302d7a08dc0c04955682
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5307618
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-02-20 07:07:32 +00:00
Benedikt Meurer 9c139aacf7 [eslint] Allow unrestricted type imports.
Bug: b:325903709, b:319814509
Change-Id: I85014dbd6d1fa52898beb246d991111aa6c3cb0e
Doc: http://go/chrome-devtools:eslint-pain-points-design
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5308062
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-02-20 07:07:32 +00:00
Benedikt Meurer a29c7ed48a [test] Rename and consolidate unit test files.
Make sure that unit test files use the same base name as the file that
they are testing. Also consolidate tests appropriately when they are
in the wrong file.

Fixed: b:325892225
Bug: b:323795674
Change-Id: I1197a44eb45544c8f6fccf330b7afe6b8e20bd21
Doc: http://go/chrome-devtools:move-unit-tests-design
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5307615
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2024-02-19 13:23:52 +00:00
Liviu Rau 18f24e0282 [deps] Ensure clang-format is present on bot for protocol browser rolls
Bug: 40272289
Change-Id: Ida9a63c1b36a4819cc90809dc8f6f6f68d104613
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5300215
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
2024-02-15 12:00:10 +00:00
Simon Zünd 1f75ddb3f3 Only generate one newline at the end of DOMPinnedProperties.ts
The presubmit likes to complain about this when creating protocol
roll CLs manually via "roll_deps.py".

R=alexrudenko@chromium.org, ergunsh@chromium.org

Bug: 40272289
Change-Id: Icfbd96cc2aac8ee648cfad631c2f2911538e61d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5297180
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
2024-02-15 08:44:49 +00:00
Simon Zünd cc99413cfc [presubmit][deps] Format touched files fully when we suspect large diffs
'git cl format', by default, only formats the changed lines for each
file. It does so by forwarding the changed lines from git to
clang-format on the command line.

For large diffs, this results in very large command line invocations
that run into the limit on windows.

As a heuristic, we should just format all changed files fully if we
suspect this might be the case.

Note that previously we skipped formatting alltogether when e.g.
node_modules was changed.

R=alexrudenko@chromium.org, ergunsh@chromium.org

Bug: 40272289
Change-Id: Ic7648a0ad81f6e27f84e07c3497542a61acd4d3a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5297179
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2024-02-15 08:04:22 +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
Ergun Erdogmus f12c052fc7 [Autoroller] Add // clang-format off to scripts generated by roll_deps and remove outdated .eslintignore comment
Using `.eslintignore` file for `clang-format` is removed in crrev.com/c/2091445 but the comment was still there.

Bug: 40272289
Change-Id: Iad48d3b7414eb373fdc24917ffac79dd331f08ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5285880
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
2024-02-13 05:13:09 +00:00
Wolfgang Beyer e57322c09c Add presubmit check for UMA Enumerated Histograms
The enumerated histograms enum is defined in 2 separate files. Since
this cannot be avoided easily, this CL adds a presubmit check which
ensures that both implementations contain the same content.

Fixed: b/41496595
Change-Id: I629f9e6a7ee409f2be6deb085a0401f0792e0805
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5272391
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2024-02-08 12:38:26 +00:00
Ergun Erdogmus f9e4033459 [Autoroller] Pass node path to inner script in roll_deps.py
Bug: 40272289
Change-Id: I118ef85657f9bbced8bdb850eb862d2a90c308c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5277378
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
2024-02-07 15:47:50 +00:00
Charles Vazac bfbdafac08 Add clear button and filter to EventStream UI
This piggybacks on the same patterns as found in ResourceWebSocketFrameView.ts.

- Note that we are searching the id, type, and data fields because they
all can be user generated
- Changes test behavior to honor newlines in *.rawresponse files


Fixed: 1488863
Change-Id: Ib73fc13fb3c44696ac9805d63d432b45545dc020
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4973389
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Charles Vazac <cvazac@gmail.com>
2024-02-07 15:13:08 +00:00
Ergün Erdoğmuş d9b49b7a7a Revert "Fix node unfound error when updating protocol resources"
This reverts commit 3c0899ea74.

Reason for revert: it doesn't fix the problem and causes another one where we try to execute a python script as a node script.

Original change's description:
> Fix node unfound error when updating protocol resources
>
> This error has been consistently reported in https://ci.chromium.org/ui/p/devtools-frontend/builders/ci-hp/Roll%20deps%20and%20chromium%20pin%20into%20devtools-frontend.
>
> Bug: None
> Change-Id: I25131059c3491407a843dd72bf515c7da6c8bca6
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5272591
> Auto-Submit: Changhao Han <changhaohan@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Commit-Queue: Liviu Rau <liviurau@chromium.org>

Bug: None
Change-Id: I229efdd3bd9f766b2792ca5b906d3ec58e5d8691
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5272389
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Liviu Rau <liviurau@google.com>
2024-02-07 14:21:53 +00:00
Changhao Han 3c0899ea74 Fix node unfound error when updating protocol resources
This error has been consistently reported in https://ci.chromium.org/ui/p/devtools-frontend/builders/ci-hp/Roll%20deps%20and%20chromium%20pin%20into%20devtools-frontend.

Bug: None
Change-Id: I25131059c3491407a843dd72bf515c7da6c8bca6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5272591
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2024-02-07 11:58:22 +00:00
Simon Zünd 803ee56682 [component-docs] Catch all requestHandler errors and bind to localhost
R=alexrudenko@chromium.org

Bug: None
Change-Id: Ie249667e7a8430e9185b3b7687694f7d51d2e9d2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5272593
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2024-02-07 07:56:16 +00:00
Alex Rudenko af11b7ca25 [test] Update Puppeteer to v22
DISABLE_THIRD_PARTY_CHECK=updating deps

Bug: none
Change-Id: I12b06b26f0bb0b938666c7748198187259fcd9fc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5268589
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2024-02-07 07:11:54 +00:00
Simon Zünd 11a99d0867 [component-docs] Fix requests for non-existent .html component files
Such requests shouldn't crash the component docs server but rather
result in a 404.

R=alexrudenko@chromium.org

Bug: None
Change-Id: I345126da8f2208d2eff248d157cfb3cfd72a0279
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5272592
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2024-02-07 07:06:51 +00:00
Simon Zünd b7b0e5349a [component-docs] Check if directory exists before attempting to read it
Otherwise we crash the server with a ENOENT error. This is
particularly annoying if a security scanner probes the component
server during a test run on the bots and causes the suite to fail.

R=andoli@chromium.org

Bug: None
Change-Id: Id6abdb6c5f310f909ffe1af45a1445dfa3f7430d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5266338
Commit-Queue: Andres Olivares <andoli@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2024-02-05 10:26:31 +00:00
Ergun Erdogmus 97a5ea3f14 [Autoroller] Update roll_deps to also generate protocol resources and run format scripts
There is an autoroller for 'browser-protocol' which runs `roll_deps.py` script however there are two issues with it:
* It doesn't run `eslint` so we cannot submit it if there is a change
to DOMPinnedProperties.ts
* It doesn't run all the update steps so rolling browser protocol
through autoroller leaves us in an half baked state:
- Protocol resources are imported
- Some sources are updated (under javascript_metadata)
- Some sources are not updated (protocol.ts etc.)

This CL updates the script to run format steps and generate protocol
resources.

Bug: 1454378
Change-Id: I506e604d47942d898cdfeec1d0df5bce19434a0b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5245435
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
2024-01-31 09:16:18 +00:00
Nikolay Vitkov c62f5c57b8 [cleanup] Use strings in EsLint Config for severity
To ease readablity of rule we should use
strings ('error','warning', 'off') rather then the
number values (2,1,0).

Bug: b:319814509
Change-Id: I4e25b268e76670ac99f3628e7b9a5778faf72e16
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5205270
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2024-01-17 14:29:26 +00:00
Ergun Erdogmus 90810655c6 [Watch] Add legacy CSS support, update Chokidar config; log messages
We weren't doing anything for legacy CSS files, this updates to:
* Generate the correct output for them
* Log a message to the console to say that it won't be hot reloaded

Drive by:
* Log when there is a TS compilation error.
* Update Chokidar options to not use polling but use fsEvents.

Bug: none
Change-Id: Ib7edb62201447917bb7bfb5ba40cf137092c1009
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5125718
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2024-01-16 14:11:16 +00:00