Commit Graph
1613 Commits
Author SHA1 Message Date
dpapad d72093d255 Remove refs to Grit's output_all_resource_defines option.
This option is no longer respected by Grit, as of crrev.com/c/786121 (~7
years ago), but it is still present in a lot of grd files.

Bug: 389466679
Change-Id: I4f9b5873fbfdd6e3548f875c27c1de825837a595
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6187824
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2025-01-22 02:16:43 -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
Jack Franklin 89e7a5f0bb Autofreestyler: support perf examples
This CL updates the auto-run tool to support performance examples that
have an entry label annotation. The tool will now select that entry,
parse the prompt out of the HTML file, and execute the AI Assistance
against it.

The tool can find the metadata from the trace / HTML comments, and it is
able to download and import the trace into DevTools.

Most of the work here was in the downloading & metadata generation; the
actual AI execution is very similar, we just select an event in the Perf
Panel rather than inspect an element.

Bug: 383120286
Change-Id: I7d6ebff3a0577c46cb87c8fa57f1fbad6c475f44
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6172722
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2025-01-21 04:36:17 -08:00
Sandor Major 289e94885a Delete ThirdPartyCookieAccessWarning/Error exemption
The feature reporting these was not launched and got removed in
https://crrev.com/c/6170641

The deprecation configuration for them is deleted in
https://crrev.com/c/6180886

Bug: 355308337
Change-Id: Icda738559fa1dedae5df2106877e46f4a423e7f0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6185607
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2025-01-20 23:21:08 -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
Kateryna Prokopenko 33546605a9 [GM3Restyling] Update run command menu
Also add a script that given an image name adds required image paths to
devtools_image_files.gni and devtools_grd_files.gni

Screenshot: https://imgur.com/a/MaU8tFD

Bug: 325442580
Change-Id: I13d1af601c5534507f5303608fc28faf612c7d3a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6170727
Auto-Submit: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2025-01-15 21:22:50 -08:00
Benedikt Meurer d2325939f7 [cleanup] Remove LitElement dependency from Protocol Monitor.
The `JSONEditor` was previously using `LitElement`, which is not in line
with how we want to build UI in the future. This does the minimal
changes to turn it into a `UI.Widget.Widget` instead and also fixes the
build dependencies accordingly.

Bug: 390071004, 301364727
Change-Id: Ia01fb731e437ffb6fd8c435b905fe5973ad5f48a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6170726
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2025-01-15 02:09:58 -08:00
Paul Irish 0783a8d746 [Watch] Drop chokidar for fs.watch() to fix missed changes
Bug:388570648
Change-Id: I7813b508624bf23228b00d9fb30da05da6d24e78
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6158783
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Paul Irish <paulirish@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2025-01-14 10:36:08 -08:00
Jack Franklin 7e8d162a0c Autofreestyler: add type checking
This CL adds typechecking to the command line tool; although we had some
type supports there was no erroring if you did something wrong or used a
function that didn't exist.

This does make the code slightly more verbose but I do think it's worth
it. I don't ever expect this to be typechecked on CQ, but it does cause
errors to appear in the editor which will help folks working on it.

Bug: 383120286
Change-Id: If4236c2e20e244be6b0abaaad4b7c90c88cb5124
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6172331
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2025-01-14 04:25:40 -08:00
Jack Franklin 27065b26c6 AutoFreestyler: support a generic comment syntax
This CL introduces the ability for comments in our examples to have any
key/value pairs, whilst also supporting the existing syntax. This means
we can define comments for examples either as:

```
<!--
  Why is this text not centered?
  # Because it has text-align: left; applied
-->
```

But now also:

```
<!--
  Prompt: Why is this text not centered?
  Explanation: Because it has text-align: left; applied
-->
```

The resulting object will be:

```
{
  prompt: 'Why is this...',
  explanation: 'Because...'
}
```

(In the old syntax, we assume lines with no prefix are prompts, and
lines with a `#` are part of the explanation).

Additionally, this CL also supports any random `A:B` key pairs, and also
ensures that multiple lines are supported. These will be used to provide
more context for other examples.

Bug: 383120286
Change-Id: Ib12c94c74d6045d845aad2edfb38d1dfb5166fec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6171178
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2025-01-14 02:07:57 -08:00
Jack Franklin e8b619ebb2 AutoAI: create tests for parseComments
Ahead of making some changes to the splitComments function, this CL
moves it into its own file that can easily be tested. The function has
also been renamed to `parseComments` which is a bit more accurate.

I considered just exporting the function from auto-run.js, but
auto-run.js assumes it is invoked on the command line, so rather than
restructure it to support being imported for tests, it was easier to
move the function into a separate helpers file.

Bug: 383120286
Change-Id: Icdd3a730def908fa180152981f2765cbf6e55c6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6171176
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2025-01-13 04:12:27 -08:00
Jack Franklin 8996ce6060 Lint: add test case for double slash in import path
Accidentally importing something as `foo//bar.js` (rather than
`foo/bar.js`) should not matter, and indeed both the TS build and
ESBuild compile fine. However you get an error when running DevTools at
runtime. What's unfortunate is that the error is very non obvious and it
took me ages to realise that the root of it was an accidental `//`.

This CL adds a check for this to the existing import rule and a test.

Fixed: 346966388
Change-Id: I3922a58b89ce639fc619c0e2b83cd14f3fe993cb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6157259
Commit-Queue: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2025-01-08 07:00:08 -08:00
Nikolay Vitkov 1f49d6a42b [tools] Fix test for EsLint and Stylelint
After the latest update to the deps these test started failing.

Bug: none
Change-Id: Ifd4a4099e465aa61087675f2fb564272e277ced0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6148217
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2025-01-08 01:56:59 -08:00
Nikolay Vitkov 9554d8f023 Unify code in check_experiment
Use the same setting we use in EsLint for consistency.

Bug: none
Change-Id: Ic56b3bb5bc85fbf37925423130e8dbb3d1ce11df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6148455
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2025-01-08 01:43:11 -08:00
Benedikt Meurer 39e5133b95 [test] Introduce Platform.DevToolsPath.urlString helper.
This adds a helper function to avoid sprinkling casts to
`Platform.DevToolsPath.UrlString` all over our unit test
suite, combined with an ESLint rule to enforce that we
use this helper consistently.

This leads to much more readable test code for unit tests
that are concerned with APIs that take `UrlString`s, and
the code is more consistent.

Bug: 323797639
Change-Id: I6d797c0db9e5bd2fd019b83b9a7a269c7437ebdf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6148578
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2025-01-07 05:49:23 -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 924fc2c153 [deps] Update StyleLint to v15.11
Info at https://stylelint.io/migration-guide/to-15
Our custom rule needed to be updated to reflect a small change.
All changes are separated into patches for ease of review.
More work is need for a v16 migration so separating it to reduce
risks of breaking.

Bug: none
Change-Id: I616829fba25b06bf8febe8390074046ad582f531
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6126881
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2025-01-03 01:57:35 -08:00
Benedikt Meurer 22a077e79e [eslint] Remove unused static-tag-must-be-static-property rule.
Bug: 370734442
Change-Id: I88925be37d6217f01764c02a6119ac6b30acb2a8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6126882
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2025-01-02 05:39:55 -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 8fbdd974ef [eslint] Add no-customized-builtin-elements rule.
Introduce an ESLint rule to disallow customized built-in elements from
being introduced, since these don't work (at all) in Safari and aren't
compatible with the Vision for the Chrome DevTools UI Engineering[^1].

[^1]: http://go/chrome-devtools:ui-engineering-proposal

Fixed: 386453980
Change-Id: I16b61f8209d2d5094bb0d6e81fba9cae7f2d9687
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6113688
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2024-12-30 13:31:48 -08:00
Benedikt Meurer e6282b1769 [eslint] Prefer assert.instanceOf and assert.notInstanceOf.
This is both more readable and generates a more meaningful error message
when the assertion fails.

Bug: 386335487
Change-Id: Ib41beec5951c3e38dfad1503e4f368dcc7aabfbb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110490
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2024-12-30 06:31:52 -08:00
Benedikt Meurer 7b03afad22 [eslint] Comparisons with object and array literals must be deep.
The previous check was too restricted in that it only checked for
array literals, and didn't bother also checking for object literals.
It was also not restricted to just the `assert.strictEqual` and the
`assert.notStrictEqual` methods, and unnecessarily prevented us from
using for example `assert.hasAnyKeys` or `assert.sameMembers`, which
is clearly beneficial in various cases.

This new check also provides a fix.

Bug: 40185458
Change-Id: I1b151cf8eb594b7255c77380967aea39a46ee2cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110248
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2024-12-30 03:24:19 -08:00
Benedikt Meurer 6fed9bc827 [eslint] Remove obsolete migrate-* rules.
These were temporarily used to migrate the style sheet approach, and
are no longer required.

Bug: 40140559
Change-Id: If2da715009576897f6f5ed343856138369d17eb6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6113683
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2024-12-30 03:15:34 -08:00
Benedikt Meurer a74dbac647 [eslint] Auto-fix support for prefer-readonly-keyword rule.
Bug: 40158772
Change-Id: I4d28d3c7a324783e96500499d676b9715018cc20
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110406
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2024-12-30 03:15:34 -08:00
Benedikt Meurer b434f78c13 [cleanup] Remove obsolete lit-no-style-interpolation rule.
This ESLint rule has been ineffective for almost 4 years now, since the
introduction of the no-style-tags-in-lit-html ESLint rule, which
disallows any `<style>` tags within lit-html templates altogether.

Bug: 40140559
Change-Id: If9dc3bdc3d803745ba2a4a1d2f9f977ed065ba80
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110229
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2024-12-30 02:07:46 -08:00
Benedikt Meurer 3832e30baf [cleanup] Remove obsolete no-repeated-tests ESLint rule.
The custom `repeat()` method was removed in https://crrev.com/c/5804334,
so there's no need to keep this ESLint rule - whose only purpose was to
check that no one accidentally commits an `it.repeat()` call in E2E
tests.

Bug: 40138497
Change-Id: If42e4d2683b81393d143a14f29edab51cd565a85
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6120410
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2024-12-30 02:06:41 -08:00
Benedikt Meurer fb31435bfb Consistently prefer assert.isOk and assert.isNotOk.
`assert.ok` is an alias for `assert.isOk`, and similarly `assert.notOk`
is an alias for `assert.isNotOk`. For consistency with other assertions
such as `assert.isNull` and `assert.isNotNull`, we enforce the use of
the slightly longer form here as well.

Bug: 386335487
Change-Id: If845a5675a78598d01b30532985239f74f701db7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6120409
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2024-12-30 00:33:56 -08:00
Benedikt Meurer 5cb9f987f7 Disallow equality assertions with boolean, null, and undefined.
Require the more descriptive `assert.isTrue`, `assert.isFalse`,
`assert.isNull`, `assert.isUndefined`, and friends instead, which also
produce a more meaningful error message than the generic
`assert.strictEqual`, `assert.deepEqual`, and friends.

Bug: 386335487
Change-Id: Ic58a07381196c358a43857b53364d74076e9c7e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6113833
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2024-12-30 00:32:53 -08:00
Benedikt Meurer e5afea232d Consistently prefer assert.lengthOf to check array-like lengths.
In our tests, we should stick to ideally just one way of asserting
array-like lengths, `assert.lengthOf`, and avoid any kind of
combinations `assert.equal`,`assert.strictEqual`, `assert.deepEqual`,
or `assert.deepStrictEqual`.

Bug: 386335487
Change-Id: I8f88e214acdae0c6e34dbb169c62ebc9a80317af
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6113832
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2024-12-30 00:31:50 -08:00
Benedikt Meurer 3dffd37833 Consistently use assert.deepEqual instead of assert.deepStrictEqual.
Previously we have been a bit sloppy with sometimes using one or the
other. In Chai both methods perform exactly the same comparison, but
the name `deepStrictEqual` can be a bit confusing to developers not
familiar with the Chai implementation, and particularly might leave
you wondering what exactly is *strict* about this method.

Fixed: 386330115
Change-Id: Idda55ee784b01cce650996ab3d56f76e220e6b2c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110227
Commit-Queue: Samiya Caur <samiyac@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Samiya Caur <samiyac@chromium.org>
2024-12-27 04:38:55 -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
Jack Franklin 4a23e068bd Add some types to AI Assistance script
I was making them to aid my debugging as I was getting familiar with the
code, and thought we might as well land some to help others too.

Bug: 704639063
Change-Id: Ia4678cc136e6414438d19c7652fd9f5b390c0cae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6085698
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2024-12-11 11:32:14 +00:00
Jayson Chen 2e999d1495 Add wicg scheduling API definition
window.scheduler.postTask and .yield are originally not available in the devtools-frontend codebase. This CL added the type definition so Typescript recognizes the API

Bug: 383240467
Change-Id: I4a395aca4e3956ceaa08053dcded5017f0ed10b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6081857
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Commit-Queue: Jayson Chen <jaysonchen@microsoft.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2024-12-10 20:09:10 +00:00
Adam Raine 61007ff654 [RPP Observations] Update definition of "field data" in translation contexts
Bug: None
Change-Id: I6f3cf66452585df8d909ac3c38a5592638ebcb4c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6079049
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Adam Raine <asraine@chromium.org>
2024-12-10 15:56:53 +00:00
Alex Rudenko 786bd42909 [AI Assistance] Renames and refactorings
Fixed: 380044548
Change-Id: I0c71417a8189a728ff10e9b6504a9887e3f26652
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6080811
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2024-12-10 11:47:32 +00: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
Ergun Erdogmus a416dab924 [FreestylerEval] Use current_message for request input
After changing the request shape we send, we needed to update
eval UI to use the new structure.

Bug: none
Change-Id: Ie19fa03d9ec521a36de18cfb1643c0b8166bf27e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6063637
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
2024-12-03 16:19:43 +00:00
Nikolay Vitkov 8962d5956d Fix check_experiments.js import
After the @typescript/eslint update their resolution does not include
CJS so the import fails. The files are still have CJS support
so import the file directly.

Bug: none
Change-Id: I84ad3164fc1046b616d99fe0c196f93f2523fcfd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6059977
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2024-11-29 15:53:12 +00:00
Liviu Rau bec18e2c02 Replace deprecated gsutil cli with gcloud storage
Bug: 380123202
Change-Id: I4d957387c063b57b635f1e6f9ad36dd2304cca5f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6038616
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2024-11-21 12:28:54 +00:00
Alex Rudenko bf9bcbf328 A helper script to convert to tsv
Bug: 379059135
Change-Id: I555f763d2123f1cb1b39fd3ae9468bb0f69613f1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6038154
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
2024-11-21 12:27:51 +00:00
Alex Rudenko 16f5a6c244 [FreestylerEval] test using UI
We now know that the hanging issue was due to code generated by the
LLM hanging and therefore the workaround to use a special event
was not actually helping.

Bug: 362730981
Change-Id: I4f70eae7aec05812922ba1035eb8a14bf831abfc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5832744
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2024-11-20 19:19:03 +00:00
Dirk Pranke a2674c024e Fix Python SyntaxWarning in //scripts/build/wasm-as.py.
In Python 3.12, unrecognized escape character sequences in a string
produce a "SyntaxWarning" log message when the file is parsed. The
fix is (usually) to change the string from a regular string to a raw
string, by putting an "r" in front of the leading quote.

Bug: 376746798
Change-Id: Ie888a8de6ae42c4daae6fa5028134722634d70c1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5981155
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2024-11-13 17:20:36 +00:00
Eric Leese 983e380a4e Remove documentation of fictional describe.skipOnPlatforms
Bug: None
Change-Id: I1ce59f5aa9c3f99a7be0e6b4c114df5b6e7fe0ee
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6004728
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2024-11-08 11:23:16 +00:00
Simon Zünd abf0cd1847 [deps] Update rollup to 4.24.3 (and update plugins)
Since we have the major version jump, we needed to update quite
a few things to make this work:

  1. rollup4 ships with native binaries. We can't check them into
     our node_modules for all platforms. Luckily they also ship a
     a wasm version. This requires us to adjust the 'binary' path
     to `node_modules/@rollup/wasm-node/dist/bin/rollup` instead.

  2. rollup4 is more strict when it comes to ES modules vs
     CommonJS. We adjust this by renaming the rollup config files.

  3. Some plugins got deprecated so we had to replace them with
     the newer versions (source maps and terser).

Bug: None
Change-Id: If13d590c8185db6ad85b3992d0a869111909dc8c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5999255
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2024-11-07 05:25:54 +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
Liviu Rau 1c8dc082a7 Update builder name prefix for screenshot collectors
Bug: 376446538
Change-Id: I64d31b001f74e74950bdd0bfc5e4be72e7d5a83d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5986493
Auto-Submit: Liviu Rau <liviurau@google.com>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2024-11-04 11:24:16 +00:00
Simon Zünd 235aa05d64 [build] Fix esbuild bundling on windows
R=kprokopenko@chromium.org

Bug: None
Change-Id: I19a809628072e94d96a35d04ec8615412b5b68ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5961818
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2024-10-24 09:52:50 +00:00