Commit Graph
1084 Commits
Author SHA1 Message Date
Changhao Han 5b178291bc Disable flaky test in memory e2e tests
Bug: chromium:1239550
Change-Id: I57010905189ac8233f42e1871b173d3d147f16b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093153
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2021-08-13 17:31:50 +00:00
Sigurd Schneider 19b55237a3 Type annotate with Page.FrameId consistently
DISABLE_THIRD_PARTY_CHECK=disable

Bug: chromium:1226471
Change-Id: I76ece085a7e448558f1f2553179c42b1188888d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3083710
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-13 17:28:44 +00:00
Philip Pfaffe ff75ee8dfe [deps] Update download_chromium after crashpad_handler got renamed
Bug: none
Change-Id: Ia3cf276afcea276197ab45977dc6b3db4e3e2e87
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3085183
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2021-08-12 09:25:13 +00:00
Alex Rudenko f1182e24da Fix missing os import in run_test_suite.js
Probably broken in crrev.com/c/3080314

Bug: chromium:1186163
Change-Id: I0478b7f137d80e1a1aad13e81579c1cc67b40cdf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3083705
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-08-10 07:01:00 +00:00
Sigurd Schneider b5657ef670 Type annotate with CSS.StyleSheetId consistently
DISABLE_THIRD_PARTY_CHECK=disable

Bug: chromium:1226471
Change-Id: I1ad6cf3c9d21251b8719010319f6b4e1ba8f24f9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3080313
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-10 06:15:19 +00:00
Jack Franklin 841587771d [TestRunner] allow --node-modules-path to be multiple paths.
Bug: chromium:1186163
Change-Id: I63a88cc94403983b1cead1d8ac54bc04469e1b03
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3080314
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-09 16:03:08 +00:00
Sigurd Schneider 02626e4afc Type-annotate ServiceWorker.RegistrationID consistently
DISABLE_THIRD_PARTY_CHECK=disable

Bug: chromium:1226471
Change-Id: I0b0cfe44753123be4a4baa6142724d56b8166655
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3080315
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-09 15:15:47 +00:00
Jack Franklin 9f22436c08 Revert "[TestRunner] remove run_test_suite.py"
This reverts commit 92000f342d.

Reason for revert: broke some places where we still rely on this script

Original change's description:
> [TestRunner] remove run_test_suite.py
>
> The CQ bots all run run_test_suite.js, and all our local `npm run X`
> scripts have run run_test_suite.js for many months now. I think we are
> now safe to remove the Python run_test_suite.py script, as all use cases
> are covered by the new JS runner.
>
> Bug: 1186163
> Change-Id: Ie8b5fd52e0934176a7da61d61fb9624b87ed764b
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3075181
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>

Bug: 1186163
Change-Id: I12505c1bc0c98c81b1de3c242f1ab7f234e6e06d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3080311
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2021-08-09 13:44:47 +00:00
Jack Franklin e716e01269 Allow run_test_suite.js not to run a server
This CL updates run_test_suite.js to allow the user to explicitly pass
in `none` for the test server type, rather than currently where the
runner basically forces you to run either the hosted mode server or the
component docs server.

Bug: chromium:1186163
Change-Id: Ib01f31f3f7ccfb4956c0c42a8deed035454e0d84
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3080310
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-09 13:32:27 +00:00
Sigurd Schneider 16cc89e295 Consistently type Target.{SessionID,TargetID}
This uncovered a bug where we used a targetID to as a sessionID,
which is fixed in this CL. The bug caused target information to
not get updated and the fix should increase target information
accuracy.

DISABLE_THIRD_PARTY_CHECK=<reason>

Bug: chromium:1226471
Change-Id: I89e461381443617d96ae06d5775038cd32ad8dd1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3080308
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-09 11:42:37 +00:00
Sigurd Schneider e195fd2829 Consistently type several protocol identifier types
This CL ensures consistent typing for the following protocol
types:
  Browser.BrowserContextID
  Browser.WindowID
  LayerTree.LayerId
  Security.CertificateId

DISABLE_THIRD_PARTY_CHECK=disable

Bug: chromium:1226471
Change-Id: I42f27da00d20b428cce3ff1a7a53a3a397f36f39
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3080301
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-08-09 10:38:47 +00:00
Sigurd Schneider 65937eaa4e Type-annotate WebAudio.GraphObjectId consistently
DISABLE_THIRD_PARTY_CHECK=disable

Drive-by: Ensure type for Media.PlayerId (no change required)

Bug: chromium:1226471
Change-Id: Ifbc6c451d57a58fec1e500f23a155a3fbc48ba58
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3077880
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-09 07:40:38 +00:00
Jan Scheffler d5bf879558 [Underscore Migration] Migrate entrypoints
This patch is part of the underscore migration that adds the private
keyword to all properties that start with an underscore and removes the
underscore.

Bug:chromium:1207342
Change-Id: Iec114859ae3f46457bafa2d823e11add202c6eb2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3077887
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-07 15:52:16 +00:00
Jack Franklin d2a117c50f Remove lint-components-css script
Now we ban CSS in web components, this script is irrelevant as it'll
never find any issues - and we lint to ensure no style tags creep into
our Lit templates.

Bug: 1106746
Change-Id: I507193c63a1ab26901d9d3aaec2b01620717b477
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3075380
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-06 18:02:47 +00:00
Sigurd Schneider e863836967 Type-annotate WebAuthn.AuthenticatorId consistently
DISABLE_THIRD_PARTY_CHECK=disable

Bug: chromium:1226471
Change-Id: If65fe3aa2aa8e21ba3e09242495d3deb25a7a415
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3077879
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-06 10:25:56 +00:00
Jack Franklin 92000f342d [TestRunner] remove run_test_suite.py
The CQ bots all run run_test_suite.js, and all our local `npm run X`
scripts have run run_test_suite.js for many months now. I think we are
now safe to remove the Python run_test_suite.py script, as all use cases
are covered by the new JS runner.

Bug: 1186163
Change-Id: Ie8b5fd52e0934176a7da61d61fb9624b87ed764b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3075181
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-08-06 10:17:47 +00:00
Jack Franklin 2c388ffbc6 Remove legacy run_test_suite.py code
This CL tidies up some leftover TODOs that we can now safely do now we
have fully migrated to run_test_suite.js.

Bug: chromium:1186163
Change-Id: I87a7e6052934e7ae0a4c5758dae2229703362242
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3075197
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-08-06 10:16:46 +00:00
Jack Franklin 98edce7f17 [TestRunner] fix bug setting configuration flags
Once we've got the `yargsObject`, we pull out all the keys we want,
which are all the configuration flags bar the special yargs keys `$0`
and `_`. The bug here was that once we pulled out that configuration, we
didn't update it, and instead kept referring to `yargsObject` in the
rest of the code. This meant that when we dynamically set the
`test-server-type` flag, we set it on `yargsObject`, but we needed to
set it on the configuration flags object so that the settings propagate
down into the test runner.

Bug: chromium:1186163
Change-Id: Ia88bb25588651fac4c11783f551651d27ccd0334
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3075379
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-06 01:23:16 +00:00
Tim van der Lippe 438d3834df Fix filename in generated tsconfig
The generated JavaScript file ends with `.js` and therefore we
should list the full name in our tsconfig as well. We ran into
compilation issues on https://crrev.com/c/3073941 and they required
the full extension to be listed. It's not clear to me why we
didn't run into this before, but it doesn't seem to break
any of the existing CSS file inclusions either.

R=jacktfranklin@chromium.org
CC=alexrudenko@chromium.org,kritisapra@google.com

Bug: 1106746
Change-Id: I45d593f4aee56b783349c82ea91cbde9b2db7d66
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3075188
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-08-05 15:59:39 +00:00
Sigurd Schneider e0890db2bd Type-annotate Network.{LoaderId,InterceptionId} consistently
DISABLE_THIRD_PARTY_CHECK=disable

Bug: chromium:1226471
Change-Id: I76f69be43970a5ad5fc4784e678edc7d843c9071
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3074612
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-08-05 12:41:29 +00:00
Sigurd Schneider 4c29a69985 Ensure P.Audits.IssueId is type-annotated consistently
DISABLE_THIRD_PARTY_CHECK=disable

Bug: chromium:1226471
Change-Id: Ic9d3352c7ce348aa180b0b110208e5aefb9bdf8a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3074606
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-08-05 11:44:39 +00:00
Sigurd Schneider b509ae7393 Avoid generating a double newline in code_generator_frontend.py
Bug: chromium:1106746
Change-Id: If9a4074466c1df88c2810ac188dac00390e5fcea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3074605
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-08-05 11:40:19 +00:00
Kriti Sapra 52ffe818db [CSS]: panels/event-listeners, panels/layer_viewer and panels/media
Bug: 1106746
Change-Id: I2a8e4421e9bc1be3c11ee21965041727de1b811d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3064215
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-08-03 13:37:03 +00:00
Tim van der Lippe 01ee32f632 Update TypeScript to version 4.3.5
R=szuend@chromium.org

Bug: none
Change-Id: Ide44ae2b82cebf96d255f7252b3a4c3882711fad
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3060706
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-07-30 11:05:46 +00:00
Tim van der Lippe 2c89197d0d Update ESLint-related packages
R=jacktfranklin@chromium.org

No-Presubmit: True
Bug: none
Change-Id: I52dc24b12e350787085c5e3d131cface7ea87142
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3060705
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-07-30 11:02:26 +00:00
Tim van der Lippe d8dbc41c38 Update build optimization packages
This updates Rollup, SVGO and clean-css. Only clean-css had reported
breaking changes, but we are not affected (Node compatibility removals
and changes to features we don't use).

R=jacktfranklin@chromium.org

Bug: none
Change-Id: I94c293e128d1ddb81f12036421a715da210e7633
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3060704
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-07-30 10:46:16 +00:00
Tim van der Lippe f8c34aec19 Update all @types packages
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I4f7d326cb76d714b30abeff8db9a0aa042e4d938
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3059613
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-30 10:40:28 +00:00
Kriti Sapra e812e1d2c1 [CSS]: panels/animation
Also added checks to migration script to ensure the bodynodes have
expressions and callees.

Bug: 1106746
Change-Id: I7697c0eb725d2a3befc9b97bfcb4fa385c6a68c5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3060698
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kriti Sapra <kritisapra@google.com>
2021-07-29 14:49:07 +00:00
Kriti Sapra 897c8aa904 [CSS] panels/lighthouse and generate_css_js now escapes ` characters
Since we put the contents of the CSS file in ``, we need to escape any
characters that may appear in comments in the CSS file before adding
it to the .css.js file.

Bug: 1106746
Change-Id: I5e304fac9c254699f64ebe1a8f99d0b13f7307ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3059610
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-29 13:00:17 +00:00
Kriti Sapra ec691c3226 Fixed path bug in migration scripts and migrated panels/help
Bug: 1106746
Change-Id: I7ae55553b6669ed60a511ab35107b0f2642862aa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3059607
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kriti Sapra <kritisapra@google.com>
2021-07-29 12:28:16 +00:00
Kriti Sapra 4d5496c671 Updated scripts to resolve paths for css files not in same directory
and fixed duplicate entries in `devtools_grd_files`.

Some files import CSS files not in the same directory as them. The
script was currently unable to handle this case and so migrations led
to `File Not Found` errors for the `.css.js` files. The script now
finds the relative path from the imported file to the current file and
adapts the import statement correctly.

Duplicates were being added to `devtools_grd_files` which led to errors
during the build. The check now verifies the entire file path is
contained in the GRD file to prevent duplication.

Bug: 1106746
Change-Id: I5da808a8885bc18477cfa31801a904e17924caab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3059012
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-28 15:38:56 +00:00
Kriti Sapra 56daf78ddb Updated no-multiple-empty-lines to only have 1 as max
DISABLE_THIRD_PARTY_CHECK=updated linting formatting
Bug: 1106746
Change-Id: I371bca95b7cf1e8b7eaa4f9e7c3860af4eedee3e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3057042
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-28 14:10:15 +00:00
Kriti Sapra 93f79d6e7b Check if the file already imports css file and prevents duplication
Bug: 1106746
Change-Id: I3d3b905c00dd7c6ce0ceefd4b2617ffe0d7ea4bc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3056377
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-27 16:37:39 +00:00
Kriti Sapra 92b65490c2 [CSS] panels/settings
Bug: 1106746
Change-Id: Ic00f88723ed727a3056d1482b22d4429459254c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3056376
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-27 16:27:20 +00:00
Simon Zünd fb7befcb75 [i18n] Remove i18n-bundle, the bundling script and the PRESUBMIT check
No users of the bundle left, so it can safely be removed. A last
cleanup step will remove the NPM packages necessary for bundling.

R=tvanderlippe@chromium.org

Bug: 1231873
Change-Id: I372f66339131a280c78514326d3527cbaa6cb6ea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3055246
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-07-27 14:56:29 +00:00
Kriti Sapra cf9d397f58 Add .css.js file to devtools_grd_files from migration scrips
Bug: 1106746
Change-Id: Ifdc5ec5bb0e19e73c41e3bd0ed3f48679a161cda
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3055241
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kriti Sapra <kritisapra@google.com>
2021-07-27 13:36:09 +00:00
Simon Zünd 73101b3e13 [deps] Remove @rollup/plugin-commonjs
The dependency was only used by buildi18nBundle.js, which will be
removed. The CL was generated with npm 7.19.1.

R=tvanderlippe@chromium.org

Fixed: 1231873
Change-Id: Ie58e9e100e8b754d3c0c2a7badcabfc3aefcc4f7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3055248
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-27 13:27:49 +00:00
Kriti Sapra 8733f78d00 Added edge case support for migrating legacy calls to
`registerRequiredCSS`.

There are two main edge cases: multiple calls to
`this.registerRequiredCSS` and calls to properties of the object, e.g.
`this._widget.registerRequiredCSS`. I have added cases to the ESLint
rule to migrate these automatically.

In ESLint tests, the output is produced after only a single pass of
the rule. Keeping this in mind, the tests for multiple calls have
been broken down into multiple tests cases.

Bug: 1106746
Change-Id: If5a4827ec7230508c9208c6d23882499495be12a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3053744
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Kriti Sapra <kritisapra@google.com>
2021-07-27 09:14:09 +00:00
Kriti Sapra 62a28b02c0 Added ESLint rule to migrate legacy calls to createShadowRootWithStyles
Bug: 1106746
Change-Id: Id39b79e3baea93411630f6526348f30081844e82
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3048479
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Kriti Sapra <kritisapra@google.com>
2021-07-26 14:12:19 +00:00
Danil Somsikov 3a8de8523b Add echoing websocket server to the hosted_mode server.
This will be useful for testing websocket-related features in
devtools. From experience, echo is almost always enough to simulate needed
behavior it test, so this is not configurable until needed.

Bug: 1228705
Change-Id: Ic88b1783443c059af88cef4ea96adcf130a5a7b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3048471
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-23 11:30:02 +00:00
Kriti Sapra 8f45fb532f Created ESLint rule and tests to migrate legacy files
It adds `import componentStyles from './component.css.js'` for any
registerRequiredCSS('front_end/component/component.css') call.

It also checks if there is an existing `wasShown()` method. If this
exists then it adds an extra line to add the
`this.adoptedStyleSheets = [componentStyles]` statement. Otherwise,
the `wasShown()` method is created and added.

Bug: 1106746
Change-Id: I7d0244d129fe0f4a50432fd7b53135760ae304ae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3043915
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-23 11:03:24 +00:00
Danil Somsikov bc259b668a Add ws module to later add websocket server to the hosted_mode server.
This will be useful for testing websocket-related features in devtools.

Bug: 1228705
Change-Id: Ic2a2a1d8d420734900df93a29966a9ebf9727215
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3048190
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2021-07-23 10:50:52 +00:00
Alex Rudenko 413451a8b1 Fix root path detection
Bug: none
Change-Id: I5834aa987d8f46f2c7042c79f501e0eb9503ed96
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3045708
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-07-22 16:16:03 +00:00
Tim van der Lippe 2b21feb560 Use devtools.gni for devtools_location
The Chromium build configuration now defines where DevTools lives.

This requires https://crrev.com/c/3043613 to roll into /build first.

R=alexrudenko@chromium.org

Fixed: 1231495
Change-Id: I2b6721a9541d191492429e9a0027523f7c9bd013
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3043614
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-07-22 13:27:33 +00:00
Tim van der Lippe e4dfc5e76a Fix devtools_location specification
By moving the declaration into default_args, we make sure that we don't
accidentally override any definition in the GN args of an engineers.
This allows us to gradually cleanup devtools_location in Chromium.

R=alexrudenko@chromium.org

Bug: 1231495
Change-Id: I52947737907fa4c536e784eb3e993805623b0489
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3043612
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-07-21 13:34:32 +00:00
Simon Zünd 8c172ce037 [l10n] Add linter rule to forbid calling i18nString without UIStrings
This CL prevents calls to i18nString and i18nLazyString without using
`UIStrings` as the first argument. While the rule is rather strict,
the few places where different usage is warranted, the rule can
be disabled.

The CL also fixes all call sites in violation  by either updating
types, or disabling the rule.

R=tvanderlippe@chromium.org

Bug: 1180760
Change-Id: Ibef05525577fc6b4443c1f7ea69023f1bba828ef
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3041381
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-21 12:29:41 +00:00
Kriti Sapra bc43679a32 Added clean-css to minify CSS on release build
Bug: 1106746
Change-Id: I4165bb4fa30564dc3b8eff942f6cb341a6e31ffb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3037550
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-20 12:22:02 +00:00
Kriti Sapra 85d053b74c Added clean-css to manage-node-deps
Bug: 1106746
Change-Id: Id978a94d06b15a34e396a19d46b2033e32e4fa71
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3038602
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kriti Sapra <kritisapra@google.com>
2021-07-19 15:29:01 +00:00
Victor Porof 3393236ac7 Use chokidar as the file watcher
DISABLE_THIRD_PARTY_CHECK=tvanderlippe

Our file watcher that was rebuilding devtools on changes relied on a
recursive option. The recursive option was only supported on macOS and
Windows, and an ERR_FEATURE_UNAVAILABLE_ON_PLATFORM exception was be
thrown when the option is used on a platform that does not support it.

One of those unsupported platforms was linux, which happens to be a
favorite around these places.

This CL switches to a cross-platform file watcher instead.

Bug: 1229622
Change-Id: Id38d1568999cdff8f054a1e716ee2525fed62fe7
Signed-off-by: Victor Porof <victorporof@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3030767
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-15 16:12:46 +00:00
Victor Porof 82a4ac6041 Add chokidar as a dev dependency
Signed-off-by: Victor Porof <victorporof@chromium.org>
Change-Id: Ideee6bb0738545f4ec8b200893149f0d5ad9e39a
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3030765
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-15 15:38:35 +00:00