Commit Graph
788 Commits
Author SHA1 Message Date
Tim van der Lippe 7f3180d06d Revert "Add data_deps for ts_library invocations"
This reverts commit 8cf3e61f27.

Reason for revert: Potential suspect for Deterministic Linux builder failurs: https://ci.chromium.org/ui/p/chromium/builders/ci/Deterministic%20Linux/30226/overview

Original change's description:
> Add data_deps for ts_library invocations
>
> Since we are switching over to using `gen/front_end` as the build
> output directory, we need to make sure that these files are included
> as data_deps for the bots. If we don't include these, then the bots
> will not be able to retrieve those files to run the layout tests.
>
> This is required to land https://crrev.com/c/2684274 where we will
> be switching away from resources/inspector to gen/front_end.
>
> R=​jacktfranklin@chromium.org
>
> Bug: 1174013
> Change-Id: I648fe296faea0edb23d4c47af837a9a2e21c2c5a
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2687497
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>

R=jacktfranklin@chromium.org

Bug: 1174013
Change-Id: I2874ed9c7ffb05d75d42769c044b2c670d29afdc
No-Tree-Checks: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2690335
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-02-11 15:54:38 +00:00
Tim van der Lippe 8cf3e61f27 Add data_deps for ts_library invocations
Since we are switching over to using `gen/front_end` as the build
output directory, we need to make sure that these files are included
as data_deps for the bots. If we don't include these, then the bots
will not be able to retrieve those files to run the layout tests.

This is required to land https://crrev.com/c/2684274 where we will
be switching away from resources/inspector to gen/front_end.

R=jacktfranklin@chromium.org

Bug: 1174013
Change-Id: I648fe296faea0edb23d4c47af837a9a2e21c2c5a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2687497
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-10 15:44:46 +00:00
Jack Franklin 60cc8ba371 Upgrade DevTools Frontend to Puppeteer 7.0.4
DISABLE_THIRD_PARTY_CHECK=upgrading pptr

Bug: none
Change-Id: I3b0672d209bd6a35ab0eed7db7cc158cc40039dc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678700
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-10 14:07:38 +00:00
Peter Marshall a9ac1bee7a [l10n] Rename the bundled i18n to i18n-bundle for clarity
There's a lot of i18n.js files in the repo and it's a bit hard to keep
track.

Bug: 1136655
Change-Id: I7c6343fee15ecf9fb2a2ce71f43f05ff48714b89
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2659336
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-09 11:37:00 +00:00
Vidal Guillermo Diazleal Ortega 0a997bb8b6 [Loc] Migrate resources(Aplication) to Localization V2
- Migrate resources(Aplication)to use Localization V2 APIs.
- Removed resources grdps

Tested with en-XL.json
https://imgur.com/a/hsH7AEm

Bug: 1136655
Change-Id: Iba7fef0b87f7aab7625f4e013f1a120baa268889
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2677336
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-09 05:17:17 +00:00
Paul Lewis 32df74a3e3 Reland "[Test] Tweaks to test runners"
This is a reland of 3124f1cbbc

Original change's description:
> [Test] Tweaks to test runners
>
> A couple of minor additions to unit test running.
>
> R=jacktfranklin@chromium.org
>
> Bug: None
> Change-Id: I06705d369bcc93802eb07aa5d15668c73c6bfa2a
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2681740
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Auto-Submit: Paul Lewis <aerotwist@chromium.org>

Bug: None
Change-Id: If68034b8bde178df4c8bcaeb51624f61daa08d5b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678689
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-08 16:36:46 +00:00
Tim van der Lippe cc0a803840 Revert "[Test] Tweaks to test runners"
This reverts commit 3124f1cbbc.

Reason for revert: It breaks `npm run auto-unittest` with the following stacktrace:

```
Traceback (most recent call last):
  File "scripts/test/run_auto_unittests.py", line 46, in <module>
    main()
  File "scripts/test/run_auto_unittests.py", line 42, in main
    args.coverage)
  File "devtools-frontend/scripts/test/run_unittests.py", line 86, in run_unit_tests_on_ninja_build_target
    cwd)
  File "devtools-frontend/scripts/test/run_unittests.py", line 28, in run_tests
    'unittests', 'karma.conf.js')
  File ".vpython-root/7aef5f/lib/python2.7/posixpath.py", line 70, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
```

Original change's description:
> [Test] Tweaks to test runners
>
> A couple of minor additions to unit test running.
>
> R=​jacktfranklin@chromium.org
>
> Bug: None
> Change-Id: I06705d369bcc93802eb07aa5d15668c73c6bfa2a
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2681740
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Auto-Submit: Paul Lewis <aerotwist@chromium.org>

TBR=aerotwist@chromium.org,jacktfranklin@chromium.org

Change-Id: I1bbd636e1316659721db634261506428b06d9f99
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678688
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-08 15:41:46 +00:00
Tim van der Lippe 8b1793142e Cleanup GRD input files
To facilitate the removal of `$resources_out_dir`, we should cleanup
the usages of that variable throughout the various GNI variables that
we define. Therefore, we perform the string concatenation of
`$resources_out_dir` in the GRD action, rather than in the variable
definition.

There are still numerous usages scattered throughout the codebase,
but we will need to tackle these separately, as that will involve
some more path wrangling.

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

Bug: 1174013
Change-Id: I760c1b153f0d2e1f9cdf1098773b92a7d05259e6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678091
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-02-08 13:22:14 +00:00
Paul Lewis 3124f1cbbc [Test] Tweaks to test runners
A couple of minor additions to unit test running.

R=jacktfranklin@chromium.org

Bug: None
Change-Id: I06705d369bcc93802eb07aa5d15668c73c6bfa2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2681740
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
2021-02-08 12:20:39 +00:00
Christy Chen 9c6d898fe6 [Loc] Migrate console to localization V2
Migrate console
Tested with en-XL: https://imgur.com/a/e6MHnR7

Bug: 1136655
Change-Id: Idda4d614f8dd86bf486abd418814d29b8d8fdfef
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2677339
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-08 02:54:18 +00:00
Paul Lewis 5dffe71f67 [unit test] Add flag for expanded test name info
In the typical case we run the unit tests with the `dot` reporter. This
CL allows the use of the karma-spec-reporter instead by setting the
EXPANDED_REPORTING environment variable.

Bug: 1175038
Change-Id: I6d5bf1207e8561ccf78bc83ee375952d646c66ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2564874
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-05 15:47:39 +00:00
Jack Franklin 49a9481a74 Lint color usage in background and border-* properties.
The list of CSS properties we check for colors wasn't thorough and
didn't include `border-left/right/top/bottom` or `background` on its
own. This CL fixes that and disables the rule for any current
violations.

Bug: 1152736
Change-Id: Ic732d653fdfab0462a04dc891bcece1f44e5d471
No-Presubmit: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2676157
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-02-05 15:39:39 +00:00
Tim van der Lippe 4374b66f2c Remove front_end/toolbox.json
Since all of its modules are removed, we can now remove toolbox
as an entrypoint from build_release_applications and build it
with `devtools_entrypoint`. There was one catch: the copy logic
we use as part of `devtools_entrypoint` was wrong and required
us to remove the trailing slash, since `front_end/toolbox.js` isn't
in a subdirectory.

R=andoli@chromium.org,aerotwist@chromium.org

Bug: 1127902
Change-Id: Ie8b47a5ceae66c8e6b607794d564d17dc6d1e3af
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678083
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2021-02-05 14:37:29 +00:00
Peter Marshall f2e07d7ca8 [l10n] Ensure .ts files are checked for LocV1 calls
.ts files go through a different code path to .js files and weren't
subject to a migrated directory check, meaning .ts files could still
contain ls`` calls even when their containing directory had been
migrated already.

This fixes the existing violations and adds the check for .ts files
so that presubmit will complain in the future.

Fixed: 1174505
Change-Id: Ic76c4c0634ac279bb27a131f891d3a3b9490c3f4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2673829
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-05 10:18:58 +00:00
Tim van der Lippe f407ef2e64 Update build output location to gen/front_end
Since resources/inspector is now a complete copy of gen/front_end,
we can update the workflows documentation and switch the
hosted_mode server to the original location.

R=jacktfranklin@chromium.org

Bug: 1174013
Change-Id: I32eda3b64cdd461e670222a47b1d424604a989b5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2673831
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-04 14:53:47 +00:00
Christy Chen c62d7a4460 [Loc] Migrate issues to localization V2
Migrate issues panel
Tested with en-XL: https://imgur.com/a/kEhfKAt


Bug: 1136655
Change-Id: I8801bf6b84d2355612133b82d15640b656a3d82e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2675006
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-04 10:55:57 +00:00
Vidal Guillermo Diazleal Ortega b77b15adb0 [Loc] Remove localization calls from platform
- Removed strings that were using localization APIs but were actually
  not being localized.

Bug: 1136655
Change-Id: I603e23d4963c8dce5ba527f412101739ce36038c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2670999
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-03 18:29:51 +00:00
Tim van der Lippe 30103efb6b Output build_release_applications in gen directory
All relevant build output files are now put into gen/front_end.
To make sure that we don't run into duplicate JS entrypoint
files, we have to turn of the emit of these targets in
front_end/BUILD.gn, such that build_release_applications can
put its output there. Since build_release_applications takes
the files from the front_end source directory, not the gen
directory, this causes no issues.

After this change, it is possible to use --custom-devtools-frontend
with gen/front_end rather than resources/inspector.

DISABLE_THIRD_PARTY_CHECK=Update TypeScript noemit
R=aerotwist@chromium.org

Bug: 1174013
Change-Id: Iad331ff0a28871a0ec297483fa03fbb485d05fb4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2672031
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-03 14:09:11 +00:00
Jack Franklin 8064d3ba7a Lint against non-theme-color variables
This CL turns on the use_theme_colors stylelint rule which enforces that
any colors use variables defined in our codebase.

There are many, many violations, unsurprisingly (about 1500), so for now
I have disabled every single violation. The goal of the dark mode
migration will be in part to remove all violations of this rule.

Additionally, new code going forwards should adhere to the rule and not
add the comment to disable the warning.

Bug: 1152736
Change-Id: I51372724ea51485daef3d4f75b7d3f60a7c8016f
No-Presubmit: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2671323
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-03 11:02:09 +00:00
Christy Chen cac3f1096e [Loc] Migrate network to localization V2
Migrate network panel
Tested with en-XL: https://imgur.com/a/7F7vWv4


Bug: 1136655
Change-Id: Idd0ab59e021a2be919ceca1def21537d6d25607d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2662325
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-03 10:44:54 +00:00
Vidal Guillermo Diazleal Ortega a8045dd770 [Loc] Migrate data_grid to Localization V2
- Migrate data_gridpanel to use Localization V2 APIs.
- Removed data_grid grdps

Tested with en-XL.json
https://imgur.com/a/SygsOPT

Bug: 1136655
Change-Id: Iccdcde49defa12310a52a286fcc36c10a6e386f1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2665034
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-02 23:15:19 +00:00
Jack Franklin 374d3ef17a [DarkMode]: Plugin to lint color variable usage
This introduces the `use_theme_colors` Stylelint plugin which checks
that all colors used in our codebase use the CSS variables defined in
either themeColors.css or inspectorStyle.css. Long term we will remove
inspectorStyle.css but for now it's not going anywhere.

It does this by looking at certain rules and seeing if there are any
colors defined in them. If there are, it errors unless those use
variables that are defined.

It also can be run in fix mode, where it disables the rule for that
given line. This is important as we have 100s of violations of this rule
at the moment, and it's going to take time to get us to a place where we
do not.

It also will allow violations in a
:host-context(.-theme-with-dark-background) block as those will normally
be using specific colors to override (although this is discouraged).

Bug: chromium:1152736
Change-Id: I79281ba931ad94f76216ee1f4c8fd0406cf0c304
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2667199
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-02 15:48:09 +00:00
Jan Scheffler a402513aba Update puppeteer to v6.0.0
DISABLE_THIRD_PARTY_CHECK=Update node deps

Bug: None
Change-Id: I775f172f4def88e816d3cfa6881dfedd20f90630
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2667202
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2021-02-02 14:36:39 +00:00
Christy Chen 7a2ead3d36 [Loc] Migrate browser_debugger to localization V2
Migrate brwoser_debugger
Tested with en-XL: https://imgur.com/a/61y0spd


Bug: 1136655
Change-Id: Ie9a831313a8d47a3b370b2248948a65881ab6685
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2667107
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-02 13:37:58 +00:00
Jack Franklin 13812f6305 PRESUBMIT check for dark mode stylesheets
Bug: chromium:1164945
Change-Id: Ie592e9c2e5ebcde94d2b0f080e9375e51f06419c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2662987
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-02-01 16:19:17 +00:00
Jack Franklin 40b5fb67b3 Remove python script for generating dark mode CSS
Now devtools_paths.js exists, we can use JS and remove the Python
version completely. This unblocks further work to enforce that
`.darkmode.css` files are up to date as part of a PRESUBMIT.

Bug: chromium:1164945
Change-Id: Ie9e8fa1cd5287d8e444085d7f036a4b17c99eda9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2662976
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-01 14:51:37 +00:00
Simon Zünd 9c429fb138 Introduce new script to check external links
This CL introduces "npm run check-external-links". The check parses
all string literals in first party JS/TS code for Urls. All the Urls
are then "pinged" by making a HEAD request to verify they still point
to an active resource. Example output:

  $ time npm run check-external-links

  > chrome-devtools-frontend@ check-external-links /usr/local/google/home/szuend/dev/devtools/devtools-frontend
  > third_party/node/node.py --output scripts/check_external_links.js

  Collecting JS/TS source files ... 1019 files found.
  Collecting Urls from files ...248 unique Urls found.
  Sending a HEAD request to each one ...

  All Urls are accessible and point to existing resources.

  npm run check-external-links  9.21s user 0.40s system 149% cpu 6.415 total

Please note that we can't make this check part of our PRESUBMIT, as
it makes external requests.
Also note that this check can't be implemented as an ESLint rule,
as ESLint rules are not allowed to have an async workload.

R=aerotwist@chromium.org, sigurds@chromium.org

Bug: chromium:1170310
Change-Id: I064161dd9038143d2e360c1716f8fb622dc119ee
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2659021
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-01 08:33:44 +00:00
vidorteg 8847361583 [Loc] Migrate accessibility to Localization V2
- Migrate accessibility to use Localization V2 APIs.
- Removed accessibility grdps

Tested with en-XL.json
https://imgur.com/a/guNtgie

Bug: 1136655
Change-Id: Id963e8eed6c8d11fd70662737f24196295f48975
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2654078
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-29 17:47:58 +00:00
Simon Zünd ddeb15e4ee Reland "Support RBE for building TypeScript int DevTools"
This is a reland of 159d86d3fb

The reland fixes the setting of "use_rbe" on the ts_library template
iff RBE is enabled for devtools directly. This prevents an
"unused variable" error when building with "use_rbe=true" and
"devtools_use_rbe=false".

Original change's description:
> Support RBE for building TypeScript int DevTools
>
> This CL implements initial support for executing TSC in the cloud by:
>   1) Introducing a new GN arg "devtools_use_rbe". This is experimental
>      and will be folded into the Chromium "use_rbe" flag once RBE
>      building has stabalized.
>   2) Pass the configured Chromium rewrapper along to ts_library.py.
>   3) Add a new function "runTscRemote" that calculates inputs required
>      and invokes rewrapper
>
> Support is currently very limited:
>   - Only works with a full Chromium checkout (NOT standalone DevTools)
>   - Only works on leaf modules (modules without DEPS)
>
> Modules that can't be currently built in the Cloud are built locally
> as per usual.
>
> DISABLE_THIRD_PARTY_CHECK=Change typescript.gni
>
> R=tvanderlippe@chromium.org
>
> Bug: chromium:1139220
> Change-Id: Id7a1e6c113466414f6daaa661456d8debfe6696d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2652508
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Change typescript.gni
Bug: chromium:1139220
Change-Id: I536fb580c3814a82525344ab5ebd5fb853568387
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2659015
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-01-29 12:55:33 +00:00
Ye Kuang fa8f4702f1 Revert "Support RBE for building TypeScript int DevTools"
This reverts commit 159d86d3fb.

Reason for revert:

This has broken a few re-client builders in Chromium:

* https://ci.chromium.org/p/chromium/builders/ci/Linux%20Builder%20%28reclient%29?limit=200
* https://ci.chromium.org/p/chromium/builders/ci/Linux%20Builder%20%28reclient%29

```
$ gn gen out/rbe-demo --args='use_rbe=true is_debug=false'
ERROR at //third_party/devtools-frontend/src/scripts/build/ninja/devtools_entrypoint.gni:132:19: Assignment had no effect.
        use_rbe = false
                  ^----
You set the variable "use_rbe" here and it was unused before it went
out of scope.
See //third_party/devtools-frontend/src/front_end/common/BUILD.gn:47:1: whence it was called.
```

Original change's description:
> Support RBE for building TypeScript int DevTools
>
> This CL implements initial support for executing TSC in the cloud by:
>   1) Introducing a new GN arg "devtools_use_rbe". This is experimental
>      and will be folded into the Chromium "use_rbe" flag once RBE
>      building has stabalized.
>   2) Pass the configured Chromium rewrapper along to ts_library.py.
>   3) Add a new function "runTscRemote" that calculates inputs required
>      and invokes rewrapper
>
> Support is currently very limited:
>   - Only works with a full Chromium checkout (NOT standalone DevTools)
>   - Only works on leaf modules (modules without DEPS)
>
> Modules that can't be currently built in the Cloud are built locally
> as per usual.
>
> DISABLE_THIRD_PARTY_CHECK=Change typescript.gni
>
> R=​tvanderlippe@chromium.org
>
> Bug: chromium:1139220
> Change-Id: Id7a1e6c113466414f6daaa661456d8debfe6696d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2652508
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=szuend@chromium.org,tvanderlippe@chromium.org

Change-Id: Ie82249ab143f86bc61d706759b7b72c43ba4c53f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1139220
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2658258
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Ye Kuang <yekuang@google.com>
2021-01-29 03:15:16 +00:00
Peter Marshall bc1350dbe0 [l10n] Update i18n build script
Import rollup explicitly to get the CJS version as rollup has changed.

Hard-code the correct paths for input/output of the script as these
have changed too.

Run the script to get the new bundled i18n.

Also-by: tvanderlippe@chromium.org
Bug: 941561
Change-Id: Id37ec2e643d6d703328381fd07541c66790088fc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2655250
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2021-01-28 12:33:37 +00:00
Christy Chen 5a52125b2e [Loc] Migrate timeline_model to localization V2
Migrate timeline_model directory


Bug: 1136655
Change-Id: Ie7023acf9d3625e26bcae542c47172bb88995bc0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2651413
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-28 12:32:27 +00:00
Simon Zünd 159d86d3fb Support RBE for building TypeScript int DevTools
This CL implements initial support for executing TSC in the cloud by:
  1) Introducing a new GN arg "devtools_use_rbe". This is experimental
     and will be folded into the Chromium "use_rbe" flag once RBE
     building has stabalized.
  2) Pass the configured Chromium rewrapper along to ts_library.py.
  3) Add a new function "runTscRemote" that calculates inputs required
     and invokes rewrapper

Support is currently very limited:
  - Only works with a full Chromium checkout (NOT standalone DevTools)
  - Only works on leaf modules (modules without DEPS)

Modules that can't be currently built in the Cloud are built locally
as per usual.

DISABLE_THIRD_PARTY_CHECK=Change typescript.gni

R=tvanderlippe@chromium.org

Bug: chromium:1139220
Change-Id: Id7a1e6c113466414f6daaa661456d8debfe6696d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2652508
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-28 12:18:47 +00:00
Tim van der Lippe a1ee70e85e Fix node action sources
When rewriting the actions that use Node to node_action,
we missed the "sources" to be forwarded to the action.
This means that a change to a source file does not properly
trigger a rebuild in GN, as GN doesn't understand it
is a source file.

R=jacktfranklin@chromium.org

Bug: None
Change-Id: I0313c6007a83417e1cc5566ae6d9bc379c17b337
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2653086
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-01-27 18:08:55 +00:00
Tim van der Lippe 7988ab3e62 Introduce GN node_action template
This template abstracts away from the `node.py` script, as well as
making sure that the JS script is properly added to the inputs
array. Before, it was easy to forget to add the JS script to the
inputs array, which can lead to GN incorrectly determining there
is no need to rebuild, while in fact the script itself changed.

R=szuend@chromium.org

Bug: 1170706
Change-Id: I759f3ef3088381ea7e4cefcb8524d7d240b46fb9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2650148
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-27 12:08:04 +00:00
Christy Chen e936c00ec7 [Loc] Migrate source_frame to localization V2
Migrate source_frame directory
en-XL: https://imgur.com/a/WOKixNs


Bug: 1136655
Change-Id: I9266985045a7068b0d1ae8a8a371f7e84a5171b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2648577
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-27 07:55:44 +00:00
Bruce Dawson 4239530627 Skip GRD compression in debug builds
GRD compression takes a while. It takes a particularly long while in
debug builds. This change skips compression on debug builds which
takes the GRD step from ~55 seconds to ~5 seconds.

Alternately we could use this framework (passing through the debug state
of the build) to try different compression options as suggested in the
bug.

Test results for debug-component and release builds with this change:
  5.2 weighted s to build gen/content/browser/devtools/devtools_resources_grit.d.stamp, gen... (5.2 s elapsed time)
  24.5 weighted s to build gen/content/browser/devtools/devtools_resources_grit.d.stamp, gen... (24.5 s elapsed time)

Release is unchanged but debug is ~11 times faster.

Bug: 1162467
Change-Id: I017ec872a1645fef55aff09472cdf4427146d17b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2639276
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2021-01-26 17:46:46 +00:00
Peter Marshall e1829f8d12 [l10n] Make sure we check subdirs in localization checks
Previously we did not iterate subdirectories which meant we missed
folders like ui/components. Now the script complains that there is no
appropriate .grdp file for the strings it finds in e.g. SurveyLink.ts.

Also add the missing strings for SurveyLink.ts as the script now finds
them.

Bug: 1169118
Change-Id: I0e4793dc8581cd439f103632e60e9b8088a529a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2644811
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-26 10:07:08 +00:00
Christy Chen e4593a52d0 [Loc] Migrate object_ui to localization V2
Migrate object_ui directory


Bug: 1136655
Change-Id: I06f52c5f12638b1bb120988fbd210bbc00797fb6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2646142
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-26 09:57:48 +00:00
Christy Chen e3eccbb247 [Loc] Migrate console_counter to localization V2
Migrate console_counter directory
Tested with en-XL: https://imgur.com/a/11ZT5gp


Bug: 1136655
Change-Id: I2da3c600d8794dda7149bc42ab1be4530c08a34d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2642464
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-25 10:07:33 +00:00
Christy Chen 59f6cf5697 [Loc] Migrate browser_sdk to localization V2
Migrate browser_sdk directory


Bug: 1136655
Change-Id: Ied83b93ee62b4e3d85799c0518b006f97066087a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2644600
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-25 07:35:53 +00:00
vidorteg fa8efd973e [Loc] Migrate color picker pane to Localization V2
- Migrate color picker to use Localization V2 APIs.
- Removed color picker grdps

Tested with en-XL.json
https://imgur.com/a/OfMtEEN

Bug: 1136655
Change-Id: I79806c1222c836ccd623bbe4ddb3dad8ab864d8e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2643999
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-22 18:24:03 +00:00
Christy Chen b6e28b60de [Loc] Migrate css_overview to localization V2
Migrate css_overview directory
Tested with en-XL: https://imgur.com/a/A5wDgqt


Bug: 1136655
Change-Id: I4de99a8504fff0a6c866e2f5079535ed4d3e65dc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2644596
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-01-22 09:15:52 +00:00
vidorteg 7c153a21c2 [Loc] Migrate profiler to Localization V2
- Migrate profiler to use Localization V2 APIs.
- Import the strings declared in the heap_snapshot_worker
- Removed event_listener grdps

Tested with en-XL.json:
https://imgur.com/MoxBmKK
https://imgur.com/cW0nelm
https://imgur.com/A99ofNG

Bug: 1136655
Change-Id: I282ff0a8ccd374dab95412eda1c974a587d1c78a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2632164
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-21 21:39:48 +00:00
vidorteg 8d1dafc6c2 [Loc] Migrate heap_snapshot_worker to Localization V2
- As this is a web worker with it's own memory space strings are not
  displayed inside but serialized and send over the profiler to be
  displayed.
- Removed event_listener grdps

Tested with en-XL.json
https://imgur.com/a/TdtQcnl

Bug: 1136655
Change-Id: I87365b50ecf2d3539504950d6ad6c391731bec54
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2631106
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-21 17:27:18 +00:00
Christy Chen f9033fa039 [Loc] Migrate perf_ui to localization V2
Migrate perf_ui

Bug: 1136655
Change-Id: I000de6662e48aa7e8e236c550584a1e5947dbad7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2641894
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-01-21 11:51:33 +00:00
vidorteg aeaf8b9be0 Making localizationV2Checks work with typescript
localizationV2Checks should also be aware of ModuleUIStrings.(ts|js).

Change-Id: Ib35a231bf1c4bd649812aef61c3192765a2949be
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2638149
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-21 01:50:23 +00:00
Christy Chen 10e970269b [Loc] Migrate inline_editor to localization V2
Migrate inline_editor directory
Tested with en-XL: https://imgur.com/a/1bw3coo


Bug: 1136655
Change-Id: I33979b0612219cdaf83b6e66e5055b0504dc7920
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2591889
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-20 13:17:30 +00:00
Jack Franklin e6dcd249e6 Inject inspectorStyle.css into the component docs
The interaction tests that have new values needed the change as the
inspectorStyle CSS changed the margins on the `body` element so some of the
tests had slightly different pixel values required when testing resizing.

Bug: chromium:1167724
Change-Id: I6569210264471f96040512e7f55158dec5c28bfd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2635666
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-18 16:48:16 +00:00
Jack Franklin bc30234f61 Migrate run_lint_check_css to JS script
As part of the work to move more scripts to Node, not Python, over time,
picked this one as the starting point. I changed its API slightly to
allow more flags to be taken in, as we'll need that to do a stylelint
pass against TypeScript files, but I will do that in a subsequent CL.

I had to make quite a few changes to devtools_paths.js, but I think it's
now calculating paths correctly. It took a bit of messing to get the
equivalent of Python's path.abspath(__file__), as you'll see from the
large comment that tries to explain what's going on!

Bug: chromium:1166108, chromium:1166572
Change-Id: Ia0b19ff8956b2ede2447530be57876a88046887e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2631113
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-18 10:30:12 +00:00