Commit Graph
1246 Commits
Author SHA1 Message Date
Jack Franklin 49e33f9fa2 Remove component docs server image path hack
This hack was needed back when we didn't unify how we loaded images in
CSS; we now do via the `var(--image-file-X)` approach that generates
correct relative images. Therefore we can lose this hack in the
component docs :)

Bug: none
Change-Id: I98ec7d21437aa280d7a33ecd4fae64f59bfba83b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2794950
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-31 11:03:13 +00:00
Jack Franklin e61c02b806 [TestRunner] Make Conductor use --chrome-features flag.
This CL fixes a bug where the test runner took the `--chrome-features`
flag but Conductor never read that value when booting up a browser
instance.

This CL updates it so it will read the value and pass it into the
relevant argument when executing `puppeteer.launch`.

I also changed the Python test suite runner to not prepend
`--enable-features`; that feels like something that Conductor should
do, not the test runner.

Bug: chromium:1186163
Change-Id: I05916d39d60bb98a606570cd82e688581dd78a40
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2790874
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-29 11:47:41 +00:00
Jack Franklin 4b34d9c8cf Revert "[TestRunner] remove --chrome-features flag"
This reverts commit 7742a201a1.

Reason for revert: We do have a use case for this flag that we missed, so we need it. Will follow-up with a CL to fix the fact that the test frontend infra doesn't use it currently.

Original change's description:
> [TestRunner] remove --chrome-features flag
>
> The scripts (both the old Python one and the new JS one) took
> `--chrome-features` as a flag, which was then set as
> `process.env.CHROME_FEATURES`, however searching the codebase for
> `CHROME_FEATURES` revealed that whilst we set this value, we never
> read it. Therefore this CL removes it entirely, my logic being that if
> someone needed this flag to work, we would have found this bug a long
> time ago.
>
> We can reintroduce should we find a usecase for it in the future.
>
> Bug: chromium:1186163
> Change-Id: I11d900df4aaad232fd64b9edca2aac12c94fc988
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2782555
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>

Bug: chromium:1186163
Change-Id: I336a4a14a3e720f3b0626d78148038ceab9a8774
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2786942
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-25 14:02:21 +00:00
Tim van der Lippe f0a9176592 Fix deps in release mode for devtools_entrypoint
In release mode, the devtools_entrypoint prebundle step was missing
the deps. We ran into this issue when we were moving the emulation
panel into panels/emulation, which required some updates to the
toolbox.ts entrypoint (crrev.com/c/2782540).

The missing deps then required the rootdir logic to be changed,
such that deps are correctly resolved relative to the gen-directory,
not the source directory.

This CL might improve build performance in release builds, since
we are now properly using incremental references for our
entrypoints and saving a bit of compilation time.

DISABLE_THIRD_PARTY_CHECK=TypeScript fix
R=aerotwist@chromium.org

Bug: 1187573
Change-Id: I4662ac90ba50116cb668dfe3164fe725b74f9a37
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2782554
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-24 16:07:44 +00:00
Jack Franklin 7742a201a1 [TestRunner] remove --chrome-features flag
The scripts (both the old Python one and the new JS one) took
`--chrome-features` as a flag, which was then set as
`process.env.CHROME_FEATURES`, however searching the codebase for
`CHROME_FEATURES` revealed that whilst we set this value, we never
read it. Therefore this CL removes it entirely, my logic being that if
someone needed this flag to work, we would have found this bug a long
time ago.

We can reintroduce should we find a usecase for it in the future.

Bug: chromium:1186163
Change-Id: I11d900df4aaad232fd64b9edca2aac12c94fc988
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2782555
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2021-03-24 15:26:05 +00:00
Tim van der Lippe 0a9b84dbd8 Update NPM dependencies
Major updates to Puppeteer (Chromium roll and updates to types:
https://github.com/puppeteer/puppeteer/blob/0b5969dea9048dc34a4d2e109e96c42e8928182c/CHANGELOG.md#800-2021-02-26) and Sinon (unaffected by browser support changes).

DISABLE_THIRD_PARTY_CHECK=NPM updates
R=jacktfranklin@chromium.org

Fixed: 1176642
Change-Id: I419300fc573e8086b4a7b3b6281c81602890f8d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2782553
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-03-24 13:47:34 +00:00
Jack Franklin 1e39e4a268 [TestRunner] allow the e2e resources path to be configurable
Bug: chromium:1186163
Change-Id: I35031bd570f88de3b884da4e57cb9de5d00e5571
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2782551
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-03-24 10:58:21 +00:00
Jack Franklin 6a83482bc7 Fix dark mode stylesheet generation
The dark mode generation was disabled due to a bug
(https://crbug.com/1185185) in the Sources Panel.

The source of that bug was that the dark mode generation takes all the
CSS in the source CSS file, applies the colour patching to it,
prepends each rule with `.-theme-with-dark-background` and then writes
the new file to disk.

The problem was that any CSS overrides defined in the source file
would not be applied, because the automatic CSS generated by the dark
mode script would be loaded after it and therefore take precedent. The
fix is to make the script smarter and recognise any overrides provided
in the source CSS file, and include them in the bottom of the dark
mode script, so that they are still applied and override the generated
CSS. This isn't ideal, as it means we load some blocks of CSS twice,
but it's better than having to manually update colours in some of our
CSS files that have 50+ declarations to update.

This CL doesn't re-enable the use of any of the dark mode scripts,
this will be done in a follow-up.

Bug: chromium:1188524
Change-Id: I03a1daa57d5535bb768696ca0d7bafc968618035
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2780804
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-24 10:02:51 +00:00
Jack Franklin fa099cbaef [TestRunner] validate file paths on input
Bug: chromium:1186163
Change-Id: If1c73edeebc1e015314ed4250ef038a816bdbcf4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2780793
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-23 11:28:59 +00:00
Jack Franklin 9fd84dfc8c Add postcss to Node deps
We already had PostCSS as an implicit dep because stylelint depends on
it. I need to use its API to parse CSS for some of the dark mode
migration, so I'm moving postcss to be a top level dep.

DISABLE_THIRD_PARTY_CHECK=updating node modules

Bug: chromium:1152736
Change-Id: I93919fb2d676337604209cf6bf9c8570f98bd5e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2780799
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-23 10:52:17 +00:00
Tim van der Lippe cf4887dd50 Remove modules from module.json
This removes all declarations of modules in module.json. All of these
are now unused, since we load all files either explicitly in layout
tests or import them using ES modules.

The timeline_model/module.json file was empty after this change, so
I removed that one as well.

R=aerotwist@chromium.org

Fixed: 1131500
Change-Id: I7d769a8944d68d82da879daf2948571911ae5d49
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2775933
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-22 13:40:54 +00:00
Tim van der Lippe 68b974a3c3 Fix eslint import rule for nested folders
When source code is in nested folders, the es_modules_import rule
would incorrectly compute the containing folders from `front_end`.
Thus, if you would have two sibling folders in `front_end/panels`,
the rule would incorrectly determine that they are in the same
folder, while technically they are in a different folder.

Therefore, the logic is rewritten to compute the common prefix
of the two paths. If either one path ends up resolving to just
a file, we assume that they were both part of the same folder.
In other words: iff after removing the common prefix you still
are importing both paths across a folder boundary, they are
considered a different folder.

R=jacktfranklin@chromium.org

Bug: 1187573
Change-Id: Ib34583e258e005a124735e17e6a92e829eb37ef3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2773054
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-03-19 08:00:29 +00:00
Tim van der Lippe 586c802693 Move console to panels/console
R=aerotwist@chromium.org

Bug: 1187573
Change-Id: I2b14b96b7478c3a140970bff60d5130f28a3d951
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2767268
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-18 15:48:57 +00:00
Jack Franklin a3dd06a3de Add test-suite-source-dir flag to new test runner
The current tests try to figure out the root directory and then glob
for _test.ts files within there, but this breaks easily if the folder
structure isn't exactly as expected. Instead we can set this via a
flag in the test runner.

This CL only updates the interaction tests, which use the new runner.
e2e tests will be supported in time.

Bug: chromium:1186163
Change-Id: I198b67bf0081ce7334c40d7d661fb8642c2d56d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2772045
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-18 11:19:17 +00:00
Jack Franklin 0e199ca69f [TestRunner] set test-server-type flag
This CL adds a flag to the new test runner to provide the test-server-type.

We intelligently set it if the test suite ends with `e2e` or
`interactions`, but otherwise it's required. Unfortunately this can't
be checked as part of Yargs' API, so we check for it ourselves at run
time.

Bug: chromium:1186163
Change-Id: I6487f1a95c6c86759e1489309d4c18aec1292073
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2767266
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-18 11:04:22 +00:00
Jack Franklin aa1d0c8587 [TestRunner] add flag for configuring DevTools root page.
That. Note that this currently isn't used or set because everyone +
all our scripts still run the Python version of the test runner
script, not the new script. But this needs to be in place before we
move people over to the new script.

We provide a fallback value such that this still works and is able to
run the tests despite the test runner not providing the configuration
via an environment variable.

Bug: chromium:1186163
Change-Id: I8255e5c7f9902be845e3c33add7b1703f6e4db9d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2766904
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-17 15:29:47 +00:00
Jack Franklin 0dc1fef024 [TestRunner] Ensure NODE_PATH is absolute.
Forgot a call to `path.resolve`, which is required in the case that
`cwd` is a relative path.

Bug: chromium:1166669
Change-Id: Ia5af9567dde5a313174ca15945778a788e43cbd2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2766895
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-03-17 10:34:07 +00:00
Philip Pfaffe 92feb60a1a Add an eslint check to prevent crbugs at the beginning of an it()
There are a handful of e2e tests which test regressions, and consequently
have a bug assiciation. This association was part of the test names in
the same way as we reference bugs for skipped tests. If such a test is
then skipped it needs to start with two crbug references. That's
confusing for the reader as well as a the skipped test lint check, for
which the regression bug references can lead to false negatives. This CL
introduces a new lint check that prevents bug references in non-skipped
tests with the same syntax as skipped tests.

Bug: none
Change-Id: Ibdf59091aba942f85424c1f12cc31160d9fe786a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2761357
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-03-16 14:14:54 +00:00
Jack Franklin fe65bc6387 [TestRunner] add base-path and shared-resources flags
This CL adds two flags to the new test runner for configuring the
components server and then updates the server to detect those values.

Note that whilst this CL adds yet-another-way to configure the
components server, this is only being done for backwards compat whilst
we roll out this change to all the various places. We will remove old
options towards the end of this work.

Bug: chromium:1186163
Change-Id: I4c9b85a5745b9fe36894e3c492952938a5b8f648
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2763875
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-16 13:59:59 +00:00
Jack Franklin 29bb6314ce [TestRunner] create new test runner that takes configuration file
This CL lands the initial new run_test_suite.js that can take its
configuration from a config JSON file, or from flags.

This new script is only used to run `npm run auto-interactionstest`
and nothing more; I want to roll it out slowly and ensure that
everyone is aware of it before removing the old Python script. I will
create a doc with all the various steps, and required documentation,
as I've taken the chance to rename some options to make them clearer.

Bug: chromium:1186163
Change-Id: I5a199f82ac7ab0f323988acacaa7aae2d64e6349
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2763866
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-16 10:35:54 +00:00
Tim van der Lippe 4fea78dcf0 Move accessibility to panels/accessibility
This also updates the Runtime and build_release_applications to use
the correct format for the various files. Most notably, it should
use the basename when concatening file names, since we don't want
to include the `panels/` part in these file names. As such, the
filenames become `panels/accessibility/accessibility_module.js`.

R=aerotwist@chromium.org

Bug: 1187573
Change-Id: I2d3d453ac0e5ea0d4358228531bfe31bde6e7655
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2757147
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-15 16:29:53 +00:00
Jack Franklin d9069b9a54 Allow shebang in ESLint license header check
Noticed when migrating a script to JS; we don't currently support
allowing a shebang at the top of a script, it gets put below the license
comment which is invalid.

This CL updates the rule to allow a shebang at the top of the file.

Bug: 1186163
Change-Id: I64a13b086452f3b7da93fa7c3dcd85521463cda7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2760242
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-15 16:11:23 +00:00
Jack Franklin 32c8d822f1 Update eslint-plugin-rulesdir to 0.2.0
DISABLE_THIRD_PARTY_CHECK=node_modules update

Bug: none
Change-Id: I0314c61235e97459facf879aec4bc8b9e1029099
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2753149
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-03-12 12:09:08 +00:00
Simon Zünd 9960666c94 Use '--inspect' when DEBUG is set in run_test_suite.py
Run the Node.js instance that executes the mocha suite for e2e tests
with '--inspect' in case DEBUG is set. This allows developers to
attach DevTools to the puppeteer side of an e2e test and step through
the code manually.

R=jacktfranklin@chromium.org

Bug: None
Change-Id: I8241767eb96899790567a3379e29e58da4f68b5b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2755967
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-03-12 09:45:38 +00:00
Simon Zünd 4277e83c29 Sort svg hashes by filename in optimize_svg.hashes
Relying on the orderedness of python dict was not enough. Luckily,
`json.dump` has an option to sort by keys when dumping JSON.

R=mathiasb@chromium.org

Bug: None
No-try: true
Change-Id: I3fced898d6aa7a36622f895dc06fe5e4372535e1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2751891
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2021-03-12 09:31:18 +00:00
Wolfgang Beyer 9b0ae2b193 Remove non-exisiting file from license-header check
Bug: 1159334
Change-Id: Id0b7766aa382d2bedf2958ae73a65f2ac053fc3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2753148
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-03-12 08:12:39 +00:00
Christy Chen 4773d6b482 [Loc] Remove scripts/Localization directory
The migration is done and scripts are not used. Remove the directory.

Bug: 1136655
Change-Id: I081a8fae318d869316e24b6738e31416f6661c9d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2751926
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-03-12 03:35:07 +00:00
Philip Pfaffe 0f054cf128 Fix passing TEST_PATTERNS to tests through env
Bug: none
Change-Id: I3c7849f8af94340aff360582b3880b4de9f82d17
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2751903
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-03-11 13:20:33 +00:00
Philip Pfaffe 9e8803fe5f Simplify running e2e tests selectively
Currently, a e2e tests can be run selectively using the --test-file
option of the test suite runner. This CL extends that by accepting
multiple file names or glob patterns as positional arguments.

Bug: none
Change-Id: Ie8edc254c82af1f280d1854a4cee2a3667b4629d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2727389
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-11 10:57:43 +00:00
Simon Zünd fc98c79d15 Upgrade 'optimize_svg_images.py' to Python3
The main reason for the upgrade is that dictionaries become ordered
with Python 3.7. This means that rebasing CLs that add new icons
becomes easier as merging the hashes file is not as tedious.

Bug: None
Change-Id: Id7e0f41262be5952eac56b282ffb52c25f236114
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2751887
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-03-11 08:44:03 +00:00
Christy Chen 141b00cd2c [Loc] Remove devtools_ui_strings generation scripts
All strings have been migrated to V2, so the scripts to generate V1 grd are no longer needed

Bug: 1136655
Change-Id: I96b776cccfb7017a11ead4983770b58962e272b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2751608
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-03-11 07:34:57 +00:00
Christy Chen 5e32bcbcf7 [Loc] Un-hook presubmit scripts
The Localization presubmit steps include checking Loc V1 and V2:
V1: Done with migration, safe to remove
V2:
- check unused string in UIStrings (Moved to ESLint)
- check migrated directory (Done with migration, safe to remove)
- check the shape of API calls (Done by typescript or ESLint)

Since all checks are obsolete or moved, this CL removes the presubmit step to unhook the scripts inside scripts/localization. I will follow up a CL to remove the actual scripts.
The CL that introduced this step https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931279


Bug: 1136655
Change-Id: If203607588896693a6331de606c873458b74cd6e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2746919
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-03-11 03:32:57 +00:00
Wolfgang Beyer 0878639185 Remove non-existing files from license-check exceptions
These files have been ported to TypeScript, which includes renaming and
adding our license header. Therefore there is no need for these
exceptions anymore.

Bug: none
Change-Id: I32d0109a19ace5b4bcb771d02beb2e23b5960e13
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2744778
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2021-03-09 11:06:15 +00:00
Philip Pfaffe 25f2974e5a Avoid hardcoding the build directory location
Bug: 1182255
Change-Id: Iefc5b0748f1a0964348e514b8e0df989be82ac0f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2742816
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2021-03-08 16:09:14 +00:00
Tim van der Lippe d3f7848567 Cleanup module.schema.json
The experiment wasn't used anywhere and the definitions specification
itself was unused as well.

R=andoli@chromium.org

Bug: none
Change-Id: I6850c493a1502ba152cab64c3e0e28385c2eb508
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2742817
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2021-03-08 15:37:54 +00:00
Tim van der Lippe fe2ba85318 Remove extensions from module.json schema
R=andoli@chromium.org

Fixed: 1134103
Change-Id: Iec6608ac9c55c4b005ade492af3fbca0b6ec1bb0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2742815
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2021-03-08 15:33:14 +00:00
Simon Zünd 8247f33e14 [l10n] Remove 'removeUnusedEntries' test
The PRESUBMIT check using the code in question was removed in favor
of an ESLint rule. The tests have moved as well.

As these tests are not regularly run on CI, we didn't notice that the
test for localization utils broke. This CL fixes that.

R=wolfi@chromium.org

Bug: chromium:1180760
Change-Id: Iea3def7adcca7dc100931387e3978f9df29dfcfd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2742486
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-03-08 12:50:54 +00:00
Simon Zünd ce7765d3a2 [deps] Update eslint-pugin-mocha to 8.1.0
DISABLE_THIRD_PARTY_CHECK=Update node deps
R=tvanderlippe@chromium.org

Bug: chromium:1180760
Change-Id: Ieb4cbb72ea2537c742b7f97fa8458efb23f643e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2739611
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-03-08 11:15:44 +00:00
Simon Zünd fec8e96b27 [l10n] Remove PRESUBMIT check for unused UIStrings entries
The check is now handled by an ESLint rule. The ESLint rule also
automatically removes unused UIStrings messages.

R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I633767a65b887bc946ce3d8106bae48676f0087a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2739602
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-08 08:09:24 +00:00
Simon Zünd 9c1be4e096 [eslint] Add rule to remove unused UIStrings messages
R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: Ie4d210bae1bc3fbcf12316a19d28a7b894f3b3c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2735036
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-08 07:42:03 +00:00
Jack Franklin 736a4b51b0 Improve path detection in hosted-mode server
This CL improves how the hosted-mode server finds the root folder. It
also removes `npm run hosted-server`, which has been broken ever since
we migrated any source files to *.ts. People shouldn't be using it and
should instead be running the server from ./out/Target/gen/scripts/....

Bug: 1182255
Change-Id: If7a37bff0c3488679c0abd69a0ec548feda8aa22
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2735895
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-03-08 07:02:19 +00:00
Tim van der Lippe 88ba72dc73 Use CSS variables for image references
This CL is the result of applying the following regex:

```
url\(Images/(.+)\.\w+\)
```

and replacing it with

```
var(--image-file-$1)
```

R=jacktfranklin@chromium.org

Bug: 1183361
Change-Id: I3255dd23c817b050deaa55835eb8c715d00387aa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732375
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-03-04 15:31:13 +00:00
Alex Rudenko 314100ad63 Reland "Exclude data files from inspector_overlay targets"
This is a reland of d5d9b950cb
This CL has to be landed after crrev.com/c/2732043 lands.

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>

Bug: chromium:1180230
Change-Id: I3afb837b8f59a0a11dee9b74e3db54f0e2c4e48f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732386
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-04 13:45:23 +00:00
Simon Zünd 4a49e2d048 [eslint] Fix bug in rule that looks at every top-level object literal
The rule looks up the 'name' attribute on the 'VariableDeclarator'
node, which does not exist, instead of the 'name' attribute on the
corresponding Identifier node.

This CL fixes that by extracting the Identifier check into a common
helper and adding a regression test.

R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: If82b24fb27f12a4ebd665b99daf5dea747bc866b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2734617
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-04 13:13:44 +00:00
Simon Zünd 333a8a04f0 [eslint] Rename l10n rule for fully locked and placeholder-only phrases
R=petermarshall@chromium.org

Bug: chromium:1180760
Change-Id: I7b489153521770124f0846e530803d5aa26e5c9f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2734614
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2021-03-04 13:07:54 +00:00
Jack Franklin c66cad4c17 [Theme Colors] exempt var(--image-file-*) from rule
Fixed: chromium:1184642
Change-Id: I902aa023dc18f46c00045a4522bfe106678f77ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2735038
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-04 12:37:12 +00:00
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