Commit Graph
850 Commits
Author SHA1 Message Date
Simon Zünd b904628c78 [eslint] Prohibit l10n phrases consisting only of a sinlge placeholder
R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I11726e1d58835a3c1acbba85d137fb2fa1cfc522
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2734474
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-03-04 10:19:02 +00:00
Eric Leese a121a6bae6 Revert "Exclude data files from inspector_overlay targets"
This reverts commit d5d9b950cb.

Reason for revert: Seems to have broken the autoroller due to missing files in fuchsia build. Reland if problem doesn't go away.

https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8853712067071111344/+/steps/compile__with_patch_/0/stdout

Original change's description:
> Exclude data files from inspector_overlay targets
>
> Fixed: chromium:1180230
> Change-Id: I99f736d53f7b653a46da8ecd572e4b3766e1798f
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716289
> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

Change-Id: I044148c6d76898657e52634a7fd0205bad355a7e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732385
Auto-Submit: Eric Leese <leese@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-03-04 06:55:13 +00:00
Simon Zünd 67789afce7 [eslint] Prohibit fully locked phrases in UIStrings object
Fully locked phrases should not go through translation. This CL adds
a new eslint rule that prevents the usage of phrases to UIStrings
where the whole phrase is locked.

R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I131ee90c902a3a44070e1a57dd554e51eb1278f1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732187
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-04 05:49:42 +00:00
Alex Rudenko d5d9b950cb Exclude data files from inspector_overlay targets
Fixed: chromium:1180230
Change-Id: I99f736d53f7b653a46da8ecd572e4b3766e1798f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716289
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-03 19:13:05 +00:00
Jack Franklin 33f773352d Fix use_theme_colors rule incorrectly flagging background-image: var(...) usage
I have also checked the codebase and there are no current instances where this
bug has caused any changes or incorrect stylelint-disable lines.

Fixed: chromium:1184242
Change-Id: I1eaa2dfd54a7a6062139be7186730f6bb844b349
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732370
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-03-03 16:16:49 +00:00
Tim van der Lippe ee04160318 Remove resources/inspector output
Now we no longer generate files into the resources/inspector build
output directory.

R=alexrudenko@chromium.org

Bug: 1174013
Change-Id: I89ac495a715c7b68a14c75d1984ba57802e7ac6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732369
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-03-03 15:55:29 +00:00
Tim van der Lippe 46afa7884a Remove copy_gen_to_resources
This template was actually unused.

R=alexrudenko@chromium.org

Bug: 1174013
Change-Id: Ie24f01feb196bd1f37b4434aaa86d52f57444653
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732188
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-03-03 15:30:50 +00:00
Jack Franklin 65a3a7fb32 Parameterise run_lint_check_css script
It now takes a flag to customise the CWD that it runs, and also
correctly passes all stylelint arguments through. Before any stylelint
argument that had a dash in would be passed through twice, and that
would cause stylelint to error.

Bug: 1184228
Change-Id: I21c0d9561dcd055968cf4bf9b4514b8184040b88
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732368
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-03-03 15:27:19 +00:00
Tim van der Lippe 96278f3164 Remove copy_sources_to_resources
R=alexrudenko@chromium.org

Bug: 1174013
Change-Id: I6a9ac5e5b961b70ab33107fdd352e1a8a64a13ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732367
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-03 15:25:29 +00:00
Tim van der Lippe 5233a7b7ec Reland "Stop copying to resources/inspector in devtools_{module,entrypoint}"
This reverts commit bdfb194fcb.

Reason for revert: Upstream reland (https://crrev.com/c/2714599) has landed.

Original change's description:
> 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>

Bug: 1174013
Change-Id: I52c4813c5cf6ec5225f731beb0e501e7b5c6c0be
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2721954
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-03 12:04:29 +00:00
Simon Zünd fb3246d320 [eslint] Only allow calls to i18nString under certain conditions
This CL heuristically prevents i18nString calls during module
instantiation time. Translated strings are most likely not available
yet (depending which module is loaded), so usually i18nLazyString
should be used instead.

The check looks at all the AST ancestor nodes of a call expression
and checks that function declaration and similar nodes are somewhere
on the ancestor chain. This DOES NOT guarantee that no calls to
i18nString are made but it is a good heuristic and the lint check
found a couple of wrong use-sites already that have been fixed
before this CL landed.

R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I04199fc54935b88d142a793f407438a718a104d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2731567
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-03 08:34:58 +00:00
Jack Franklin 02f0dbb824 Lint for commented out console.log calls
Fixed: 1183727
Change-Id: I7bb5a859fdab4c42693623e87a3763fe141a46e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2729038
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-03 07:44:48 +00:00
Jack Franklin 41a717c58f Remove scripts/migration
The great ES Modules migration has long finished so we don't need these
scripts anymore :)

Bug: none
Change-Id: I30874c85c134527b235b0941573786439ffa3740
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2729039
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-03-02 12:35:16 +00:00
Jack Franklin 0155f7d199 Provide --component-docs-base argument to components server
The component server assumes that the examples live in
root/out/Target/front_end/component_docs, but now you can pass
--component-docs-base to change that.

Bug: 1182255
Change-Id: I143aee02bcd2a32e4f6ea163ac5edd5f44156bdc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2727422
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-02 11:01:41 +00:00
Jack Franklin 6dbe837682 Lint border-color and outline usages in CSS.
Updates the use_theme_colors rule to pick out border-color rules.

Fixed:chromium:1182679
Change-Id: I0f0f9b4a30f588e901b57131c796d73f2ac73656
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2722441
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-02 07:20:46 +00:00
Jack Franklin d0bac676f2 Update run_test_suite to support --test-suite-path
The current test suite runner assumes the paths; you pass
--test-suite=interactions and it assumes that they live in
out/TARGET/gen/test/interactions. This CL removes that assumption by
asking people to pass --test-suite-path, which would be
out/gen/interactions.

We will remove the --test-suite flag, but for now we're keeping it
around so the bots can still run their tests. I will file a bug to ask
that the bots have their recipes updated.

Bug:1182255
Change-Id: I6d9e5d419231845047394c5f7cbd0c74ebad3a58
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2722448
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-01 10:24:17 +00:00
Liviu Rau af66926e7b Whitespace to trigger builders
TBR=tvanderlippe@chromium.org
Bug: chromium:1182199
Change-Id: I94bdabc63700c1c8ae6c64d6d8e780700587a2bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2726557
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2021-02-28 18:31:08 +00:00
Vidal Guillermo Diazleal Ortega 4786bc4eee [Loc] Migrate emulated devices to Localization V2
This CL removes localization from the emulated_devices module for the
following reasons:
- The module does not have a UI surface where the strings are shown; it
declares the strings while emulation consumes and show them.
- Most of the strings declared in the module are branded strings which
are out of scope for translation. (e.g Android/IOS phone models)
- The only strings need to be localized here will be added to
  emulation:
    - "Laptop with HiDPI screen"
    - "Laptop with MDPI screen"
    - "Laptop with touch"

In a similar way as done in here:
2631106: [Loc] Migrate heap_snapshot_worker to Localization V2 |
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2631106

Bug: 1136655
Change-Id: I88b12f7adb955b7236f79bb862dba0db7dc5d5cc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2707864
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
2021-02-27 02:12:35 +00:00
Kalon Hinds 9678fd4885 [Loc] Migrate inspector_main to Localization V2
Bug: 1136655
Change-Id: Ie2af3f5e8053ab1aad2a8bf35a49965493f66bd4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2719830
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-26 20:40:55 +00:00
Kalon Hinds 1fb8543be8 [Loc] Migrate emulation to Localization V2
Bug: 1136655
Change-Id: I935a118ad134ebce061395baf1e6721cef85d7c5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2522640
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-26 20:02:05 +00:00
Vidal Guillermo Diazleal Ortega 8d2f5c2e29 [Loc] Migrate main to Localization V2
- Migrating main to use localization V2 APIs
- Removed main grdps

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

Bug: 1136655
Change-Id: I847a3e39d6d89069b11913fd2202a230db5c1b14
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2721232
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-26 19:08:45 +00:00
Jan Scheffler 9aca8c7402 [JSDOC2TS]: Migrate host
Bug: chromium:1158760
Change-Id: I86a4477d44617adac598f107755fbd3db49d7bf2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2718291
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-26 17:18:55 +00:00
Tim van der Lippe 64b277df88 Remove har_importer/module.json
R=andoli@chromium.org

Bug: 1127902
Change-Id: Ib1d260cc1d58c4517243e477600e4f1815aeef09
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2704478
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2021-02-26 16:26:45 +00:00
Jack Franklin 343c141919 merge inspectorStyle.css and inspectorCommon.css
It seems there is no requirement for these files to be split; they don't
seem to have a logical split and they are both injected into the `body`
element when DevTools runs. If we kept both of these files around, we'd
have to inject them both into the component docs helpers, and deal with
both of them when it comes to figuring out where legacy CSS variables
are defined.

To make it a bit simpler I've merged `inspectorStyle` into
`inspectorCommon`. I went this way because:

* `inspectorCommon.css` is (I think!) a better name than `inspectorStyle.css`
* `inspectorCommon.css` was bigger.

I also drive-by disabled the stylelint `comment-empty-line-before`,
which was forbidding empty lines before any CSS comments; which made the
entire file feel very squashed!

Bug: none
Change-Id: Ifaa834c7bf56291561e2e5cc124c4efd85c3cc56
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716285
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-26 15:50:55 +00:00
Simon Zünd e15f3efe0a [eslint] Prevent the export of the UIStrings object
Sharing translations between files is not officially supported yet
and even if we would do so, the path will go most likely over the
module's respective ModuleUIStrings file (already happening in some
cases).

Note that this CL doesn't yet enable the rule, as it would touch
all files using UIStrings objects currently.

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

Bug: chromium:1180760
Change-Id: I96aee4e214809d76d65a21962974e9cfb61e4f46
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2718298
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-02-26 15:18:05 +00:00
Jack Franklin 0943df4002 Fix detection of out/Target from component docs when running via npm.
Bug: none
Change-Id: Ic372c065b1c6ffd441ee8dd523604ce368792ac7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2721951
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-26 12:49:55 +00:00
Changhao Han 5663e48217 Add override prefix to stylelint theme color logic
Bug: chromium:1171775
Change-Id: Ia63217e154009034a585e8ccbd8ac482da519fae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2720368
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2021-02-26 11:52:44 +00:00
Jack Franklin 8742dc884c Make component docs server paths more robust.
Bug: none
Change-Id: I18c993b6aed44afc750928def0c6f0685f947d4b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2720246
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-26 09:50:54 +00:00
Vidal Guillermo Diazleal Ortega 697d6a0b7b [Loc] Migrate sdk to Localization V2
- Migrating sdk to use localization V2 APIs
- Removed sdk grdps

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

Bug: 1136655
Change-Id: I0b67544324cfb6d7d66547d5e4ae3ad5784e1c93
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2719022
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-25 19:15:09 +00:00
Christy Chen 1825c61352 [Loc] Migrate common to localization V2
Migrate common directory

Disable two tests that require updates due to this migration https://chromium-review.googlesource.com/c/chromium/src/+/2692841

Bug: 1136655
Change-Id: I87452f217163c13756d5fdc971f6a445bb2a3317
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2668967
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-02-25 12:17:08 +00:00
Jack Franklin 03412d8a25 Make cwd and NODE_PATH absolute in test runner
This CL makes the custom node_modules_path absolute, because Node
requires it to be an absolute path, and does the same thing with the
custom `cwd` argument. Else if you pass a custom `cwd` you'll get errors
in the test suite as running `mocha --config ./foo/config.js` doesn't
work; Mocha also wants the path to be absolute.

Bug: none
Change-Id: Ib626075f4dd1c00fa2998d55fda8c212b8e853c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2718297
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-25 12:14:08 +00:00
Jack Franklin 8425c1bb3e Parameterise test runs
This CL adds two flags to our run_test_suite helper:

* --cwd to set the current working directory to use as a base to find
  tests
* --node_modules-path, which sets NODE_PATH to the given value. This can
  be used to aid Node in resolving require statements if node_modules
  aren't in the local node_modules folder.

Bug: none
Change-Id: I6c7f83d028d3ad689b61642aa9a5e51177c0628d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2718296
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-25 11:29:58 +00:00
Vidal Guillermo Diazleal Ortega 267cafb44e [Loc] Migrate host to Localization V2
- Migrate host to use Localization V2 APIs.
- Removed host grdps

Bug: 1136655
Change-Id: I35dec4e896b0f814dbc8acc6e610a0663dd88f0c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2717169
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-24 17:25:48 +00:00
Tim van der Lippe 51257fc619 Update CodeMirror to 5.59.4
This pulls in the fix for
https://github.com/codemirror/CodeMirror/issues/6599

It also fixes an issue with the darkmode sheet generation that
had the wrong path for Chrome binaries on Mac.

R=jacktfranklin@chromium.org

Bug: 1180740
Change-Id: I8b879bdefb0567c4d44b457255c88ef4395924c9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716287
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-24 12:34:38 +00:00
Kalon Hinds 2684bb9eb5 [Loc] Migrate bindings to Localization V2
Bug: 1136655
Change-Id: I141736d3ccba155aa69186aef9fd53e84569755d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2583492
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-24 09:58:27 +00:00
Simon Zünd 5d16e121f4 [eslint] Check that the current file is passed to i18n.registerUIString
R=jacktfranklin@chromium.org, petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: Ie47a89c003f309b678ef9da65cb860cceaa14e2b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2717763
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-02-24 09:29:16 +00:00
Vidal Guillermo Diazleal Ortega aaaa364915 [Loc] Adding ui to check_localized_strings
I missed to add ui to check_localized_strings during its v2 migration
this, CLs fixes this.

Bug: 1136655
Change-Id: Ic485c9fb0eddf136b2eec9ce0c832874d1114e38
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2715622
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-24 06:57:46 +00:00
Kalon Hinds b8b378f29b [Loc] Migrate quick_open to Localization V2
Bug: 1136655
Change-Id: Ia4ca7d9a905e0a234be4c4a4418698213ed6cbc5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2583489
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-24 06:30:26 +00:00
Tim van der Lippe 7265494e1a Add acorn.mjs to data
In debug builds, we don't Rollup into `third_party/acorn/acorn.js`.
Therefore, the `acorn.mjs` from the NPM package should be present.
However, the previous `data` filtering only included `*.js` files
and missed `*.mjs` files. Therefore, add the extra filter to make
sure debug builds work correctly.

R=jacktfranklin@chromium.org

Bug: 1174013, 1180967
Change-Id: I104699f5d5443306f5b0e6017cf9ee418a98143e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2714551
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-23 14:42:30 +00:00
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