Commit Graph
811 Commits
Author SHA1 Message Date
Changhao Han bdfb194fcb Revert "Stop copying to resources/inspector in devtools_{module,entrypoint}"
This reverts commit 037c96df04.

Reason for revert: upstream revert: https://crrev.com/c/2713518

Original change's description:
> Stop copying to resources/inspector in devtools_{module,entrypoint}
>
> This simplifies the JavaScript generating tasks in the DevTools
> build system to stop copying to resources/inspector. The output
> to the gen-folder will remain as-is.
>
> After this change, it will no longer be possible to use
> resources/inspector as build output location when using
> --custom-devtools-frontend. Instead, the location should be
> updated to use gen/front_end instead. Engineers are encouraged
> to remove the resources/inspector build output folder to ensure
> stale build artifacts aren't accidentally used while working
> on DevTools locally.
>
> Note that there are still files in resources/inspector generated by
> other actions in the build system. We will clean these up in
> follow-up CLs.
>
> R=​alexrudenko@chromium.org,jacktfranklin@chromium.org
>
> Bug: 1174013
> Change-Id: I750d04e58c5fa85054b8451c3582b58a3f7c77ba
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678696
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>

Bug: 1174013
Change-Id: I9c4c561a59d808d3fdd1564475ec5ba21955d577
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2714545
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-23 10:06:51 +00:00
Tim van der Lippe 037c96df04 Stop copying to resources/inspector in devtools_{module,entrypoint}
This simplifies the JavaScript generating tasks in the DevTools
build system to stop copying to resources/inspector. The output
to the gen-folder will remain as-is.

After this change, it will no longer be possible to use
resources/inspector as build output location when using
--custom-devtools-frontend. Instead, the location should be
updated to use gen/front_end instead. Engineers are encouraged
to remove the resources/inspector build output folder to ensure
stale build artifacts aren't accidentally used while working
on DevTools locally.

Note that there are still files in resources/inspector generated by
other actions in the build system. We will clean these up in
follow-up CLs.

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

Bug: 1174013
Change-Id: I750d04e58c5fa85054b8451c3582b58a3f7c77ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678696
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-02-22 20:11:25 +00:00
Tim van der Lippe 723456aabb Remove front_end/client-variations
All usages of client-variations now directly import the third_party
content. This was previously not possible with the module.json
infrastructure, but we can now directly import the relevant
files. Therefore, we can remove the module.json file itself and
the references to it in the module.json dependency hierarchy.

R=mathias@chromium.org

Bug: 1127902
Change-Id: I36d987ca3e645407879da0a81f305de5088711e5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2700731
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-02-22 15:36:34 +00:00
Tim van der Lippe 459f40214e Run npm run install-deps on NPM 7.4.5
This CL contains the output of running `npm run install-deps` on
NPM 7.4.5. This includes a version bump of the package-lock.json,
which means all DevTools engineers who run `npm run install-deps`
should use NPM 7+. Additionally, this allows `npm run dedupe` to
produce a better output and remove more duplicate packages.
For more information, see https://github.com/eslint/eslint/issues/14098

DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Bug: none
Change-Id: Id1ca2f33f3bb7d555dca1c0737d38bc1c7f5221c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2705386
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-19 13:25:21 +00:00
Tim van der Lippe b475b8128a Run npm dedupe by default when installing dependencies
This should reduce the disk usage of node_modules for DevTools
clones, hopefully resulting in an overall faster checkout.
For more information, see https://github.com/eslint/eslint/issues/14098

DISABLE_THIRD_PARTY_CHECK=NPM dedupe
R=jacktfranklin@chromium.org

Bug: none
Change-Id: If6759c07480b8ac82b78b7730b8a5ac18bb40b86
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2705383
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-02-19 11:23:50 +00:00
Alex Rudenko 27d120309b Allow skipping e2e tests for a particular platform
Adds it.skipOnPlatforms function to skip an e2e test only on given
platforms. For example,

it.skipOnPlatforms(['mac'], '[crbug.com/xxxx] test name', ..);

Bug: none
Change-Id: Ia73382628c92195adfae9eebbb426250a5a55973
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2703964
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-02-19 08:27:25 +00:00
Tim van der Lippe e362b0826a Remove javascript_metadata/module.json
R=andoli@chromium.org

Bug: 1127902
Change-Id: I9c3f973582a55ce621b6aa6ecdeac97a3021e181
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2704439
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-18 17:12:24 +00:00
Simon Zünd f96b059ad6 [ts] Update TypeScript to 4.2.1-rc
DISABLE_THIRD_PARTY_CHECK=TS upgrade

R=tvanderlippe@chromium.org

Bug: None
Change-Id: I2d38f58049560ac6d21e33039fea714ec5115e75
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2703951
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-02-18 11:14:44 +00:00
Tim van der Lippe 74e4acb702 Include i18n locales in runtime_deps
In https://crrev.com/c/2684274 the layout tests will use the gen
build output of DevTools. The layout tests are still failing (
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8855048827859077360/+/steps/blink_web_tests__with_patch_/0/logs/outdir_json/0 )
with the following error:

```
PROMISE FAILURE: Error: While loading from url http://localhost:8000/inspector-sources/i18n/locales/en-US.json server responded with a status of 404
  at XMLHttpRequest.n.onreadystatechange (http://localhost:8000/inspector-sources/root/root.js:1:8457)
```

As it turns out, we need to explicitly list the locales as `data`
as well. Rather than updating the `filter_include` to include `*.json`
(which would cause it to include `tsconfig.json` files, which we
don't want), we should instead only include the mapped sources in
the gen-directory. We also can't use the `invoker.sources` array
directly, as that would include `*.ts` files, which don't have a
corresponding `gen` build output file. That would crash the CQ
bots as well, as they ensure that all `runtime_deps` files exist.

R=jacktfranklin@chromium.org

Bug: 1174013
Change-Id: I35623e86c40f5616836c1387c150fc492db527e6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2700391
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-17 15:19:02 +00:00
Tim van der Lippe 6d109a9d45 Update Mocha to 8.3.0
This also adds Python-2.0 to the list of accepted licenses.

Lastly, it fixes a bug where the package.json files were incorrectly
reordered. For the `exports` of a particular package, the order that
the entrypoints are defined in is crucial. Therefore, we should not
alter the order of entrypoints and instead maintain the originally
defined ordering. We can use an `OrderedDict` to ensure that Python
always loads the JSON files in the same order.

DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I5a309782de6015edea6ba3b502aa0db1f008d973
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692909
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-17 12:08:49 +00:00
Vidal Guillermo Diazleal Ortega 83edb474b3 [Loc] Migrate Sources to Localization V2
- Migrate sources to use Localization V2 APIs.
- Removed sources grdps

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

Bug: 1136655
Change-Id: I01d4fcdc3f115e9edb3fae933c7d5c6b9ffb77c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692743
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-16 19:14:49 +00:00
Tim van der Lippe b391dcebc9 Add files generated in gen/front_end to runtime_deps
The previous attempt of this fix was in https://crrev.com/c/2687497
That CL was reverted, as it inadvertently added more files to the
runtime_deps then was intended. Most notably, it erroneously included
`tsconfig.json`, `tsbuildinfo` and `d.ts` files.

Instead, we should manually filter out only those files that we are
interested in. In this case, these are the `js` and `js.map` files.
Once these are added to the runtime_deps, the layout tests can access
them, as they are pushed to the bots.

I have verified that the following command shows the expected output:

gn desc out/Default front_end/platform:bundle runtime_deps

R=jacktfranklin@chromium.org

Bug: 1174013
Change-Id: I6bc25665f06b5968bbd9748696a5723edac84ddc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2697201
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-16 15:53:01 +00:00
Jack Franklin 5bb7528e13 Update check_license_header rule with new year
It was inserting comments with 2020 in. I've updated it to figure out
the current year. This theoretically could cause problems if people are
either side of a year on New Years eve, but I'm hoping people are busy
not working then :D

Bug: none
Change-Id: I9f6cc9329189d89e6994cc0963fa70617cb446c3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2696660
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-02-16 12:53:28 +00:00
Tim van der Lippe e53b6a665f Update infrastructure packages
This updates bl, yargs and runs `npm run audit fix` to fix
a low severity vulnerability.

DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I087a3cc1183cb2f9b569f058c64c7ec40166b778
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692908
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-15 14:37:36 +00:00
Tim van der Lippe cc71b28ac4 Update stylelint to 13.10.0
DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I41b7006f336b9465677cc7434abd70a732c58221
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692907
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-15 14:11:00 +00:00
Tim van der Lippe c7b05fe360 Update testing packages
This updates Chai, Karma and Sinon. The breaking changes in Karma
6.0.0 don't affect us.

DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I77c2d4b1aeb1f0544d56c1f8a37e409a19352bfe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692906
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-15 13:17:30 +00:00
Tim van der Lippe a28afdbaae Update Rollup to 2.38.5
DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I8c647fb704b19966c1b709e2c9562d0a6f332be2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692786
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-15 12:43:50 +00:00
Vidal Guillermo Diazleal Ortega 87060e47d6 [Loc] Migrate timeline(Performance) to Localization V2
- Migrate timeline(Performance) to use Localization V2 APIs.
- Removed timeline grdps

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

Bug: 1136655
Change-Id: I0b282c5c9efdd90fd57c376ea4f69ff8eb0d3006
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2689595
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-12 16:47:58 +00:00
Tim van der Lippe b97da6baaa Update ESLint to 7.19.0
DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I6bc8fd7e6f416ceae5e849ba3c4061887b940f07
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692306
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-12 15:49:18 +00:00
Tim van der Lippe cf4ab40452 Update typescript-eslint to 4.15.0
This also fixes a bug in the PRESUBMIT that ensures that, whenever
we update typescript-eslint, we correctly rerun the full linter
check.

DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I016f73b26cd84cabf3171aba89c88a0d72820f1a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692165
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-12 15:42:37 +00:00
Tim van der Lippe 90e5470c94 Update @types packages
DISABLE_THIRD_PARTY_CHECK=NPM updates
R=jacktfranklin@chromium.org

Bug: none
Change-Id: Ia9e3e529cab792cf1c0773f16523489e29fcb6ff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692163
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-02-12 14:30:45 +00:00
Jack Franklin 5017c095f3 Bump Puppeteer to 7.1.0
Doing so lets me remove some of my hacks for previously broken types.

DISABLE_THIRD_PARTY_CHECK=upgrading puppeteer

Bug: chromium:1176642
Change-Id: I141c6eadfe258ac2c8c31fa86c80f014362ee8ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692157
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-02-12 12:04:06 +00:00
Vidal Guillermo Diazleal Ortega 3da6eaffea Adding i18nLazyString to the localization scripts.
Modifying localization scripts to accept i18nLazyString as a valid
wrapper for UIStrings structure, so that when used, they don't get removed from
it.

Bug: 1136655
Change-Id: I87ad53a7a7c6192e74af62b267f2ac31a25bb477
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2689102
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2021-02-11 17:52:27 +00:00
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