Commit Graph
657 Commits
Author SHA1 Message Date
Jack Franklin b14dbe3426 Fix heuristic for determining external bundles in Release
The current bundling system with Rollup tries to determine when given a
file if it’s an entry point (e.g. ui/ui.js) or not (e.g ui/someFile.js).
If it’s not an entry point, it will bundle that file into the entry
point JS file. So when we go to bundle ui/ui.js, it’ll find files like
ui/someFile.js, and pull them into ui/ui.js, which ends up being a fully
“rolled up” version of the ui folder.

The problem comes when you nest these folders;
ui/components/components.js is an entry point but the logic that the
Rollup bundling code uses incorrectly detects it as a regular file. So
you end up with ui/ui.js including a rolled-up version of
ui/components/components.js, which itself is a rolled-up file. We then
ship ui/ui.js and ui/components/components.js, meaning we’ve shipped
components.js twice - once as a standalone file, and once because it was
rolled up into ui.js.

This CL fixes this by changing how we detect bundles, we now look for
importing files whose parent directory is the same, so:

- components/components.js is a bundle
- but components/foo.js is not a bundle

By making this change we also now correctly detect third_party bundles,
with the exception of Acorn which is a special case, so we can lose the
checks for that in our Rollup config.

The logic here is somewhat duplicated between Rollup's config and the
ESLint rule plugin that we have; I plan on making a follow-up CL that
tries to define this logic in one place so if it changes in the future
we can update the code in one place and have the linting & rollup
update, plus we'll be able to use the ESLint tests as coverage to ensure
we've not broken our bundling.

Fixed: 1144123
Change-Id: Idd82a3ef69a09871867626a0d74266e25801243f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2534202
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-18 14:19:58 +00:00
Paul Lewis d14436f822 [unit test] Add flag for HTML report generation
R=liviurau@chromium.org

Change-Id: I5628f4754d502e67615df0b0a2fe09981d4dc52b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2545819
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
2020-11-18 13:02:38 +00:00
Jan Scheffler f74777559c [e2etest] Move hosted mode server to https
This allows testing things that require secure connections
like thrid party cookies.

Change-Id: Id7f6dc672f8a2e701f2baad22fa035826a8d7b2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537951
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-18 12:58:43 +00:00
Changhao Han 45bd77db91 TypeScriptify StylesSidebarPane.js: final part
DISABLE_THIRD_PARTY_CHECK=adding new TypeScript definition file

Bug: chromium:1011811, chromium:1093296
Change-Id: Ifb03cf74d98ab4c3aeba40bdce19051e85ffdd38
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2544482
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-17 21:13:27 +00:00
vidorteg 0527ac564a [Loc] Migrate layers to Loc V2
- Migrate layers panel to use Localization V2 APIs.
- Removed layers grdps

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

Bug: 1136655
Change-Id: I255b1edbc265aab11728f78905c55d77a5fb3bb9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2543113
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-11-17 20:02:06 +00:00
Christy Chen 14a913c836 [Loc] Migrate webauthn to localization V2
Migrate webAuthn tool
Tested with en-XL: https://imgur.com/a/medKsEq


Bug: 1136655
Change-Id: Id44fc298fb38f09467eedb77a3a2d50493462ac1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2543102
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-11-17 19:02:27 +00:00
Christy Chen 598b98fe2b [Loc] Migrate web_audio to localization V2
Migrate web_audio tool
Tested with en-XL: https://imgur.com/0eEBFqM

Bug: 1136655
Change-Id: Ibef905a1302eb807de78296bccaadc1559d5f642
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2538490
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-11-16 19:32:49 +00:00
Tim van der Lippe afe76b65c9 Update @typescript-eslint packages
https://github.com/typescript-eslint/typescript-eslint/releases/tag/v4.0.0
none of the breaking changes apply to us.

DISABLE_THIRD_PARTY_CHECK=NPM updates
R=jacktfranklin@chromium.org

Change-Id: Id61788dc65d352f7ecffaea9cf1918141ae3f842
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537959
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-16 15:53:09 +00:00
Tim van der Lippe 59b55bbc11 Update Rollup and rollup-plugin-terser
Rollup-plugin-terser dropped Node <10 and Rollup <2 support
(https://github.com/TrySound/rollup-plugin-terser/releases/tag/v6.0.0)
and upgraded to Terser 5
(https://github.com/TrySound/rollup-plugin-terser/releases/tag/v7.0.0)

DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Change-Id: Ifa0085fe5daa052bdfea40720d1852549f4bf316
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537956
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-16 14:46:18 +00:00
Tim van der Lippe dc4637c1a9 Update escodegen and recast
- Escodegen drops Node 6 support (unaffected) and introduces support
for optional chaining
- Recast drops Node <9 support (unaffected)

DISABLE_THIRD_PARTY_CHECK=NPM updates
R=jacktfranklin@chromium.org

Change-Id: I9eb8d294d3ad87a6469da9e0bc1114563abd4f07
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537955
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-16 14:13:28 +00:00
Tim van der Lippe 66f80d99ca Fix ESLint tests
The upgrade to ESLint 7.0.0 broke our custom rule tests. It seems
we were affected by https://github.com/eslint/eslint/issues/13293
after all.

R=jacktfranklin@chromium.org

Change-Id: I3dcf8b7e15f1bc6a26c2fa069f24241e87f07627
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2538840
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>
2020-11-16 12:15:09 +00:00
Tim van der Lippe 97868bd80a Update @types packages
DISABLE_THIRD_PARTY_CHECK=NPM updates
R=jacktfranklin@chromium.org

Bug: 1011811
Change-Id: I16c3891ec647f9e7e9ede59713a5e3b10ebf2c7a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537952
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>
2020-11-16 12:02:39 +00:00
Jack Franklin b5920ca458 Enforce kebab-case naming of custom events
Fixed: 1145972
Change-Id: Id16bd5d28e77f0d37b543e0366257bbf84b5d4a0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2536399
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-16 10:12:09 +00:00
Paul Lewis be466dc7ac [eslint] Change es_modules_import rule to also check unit test files
This is a clone of https://crrev.com/c/2323191.

Bug: 1148296
Change-Id: Ia49ccdb2ba253f0c9fe2138b07ca19f082501522
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537957
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-13 17:48:19 +00:00
Peter Marshall 580bbf4bbc tests: Add final changes for parallel e2e tests
Only set the unhandled rejection handler once per process.
We run the setup and teardown multiple times per-process now.

Add clearPuppeteerState() to unset the state between runs on
a parallel test runner. This is because the port changes
between successive runs in the same process.

Remove the hasShutdown logic from mocha_hooks. Also remove the
beforeExit hook which was causing this to get called at least
twice for every process. It already gets called in the ordinary
shutdown case via the afterAll() hook. We only need to call it
in the extraordinary case which is the SIGINT case. Now that we
do the shutdown multiple times per process, we don't care if we
already shutdown on this process or not. The only issue could be
if ctrl+c is sent during the shutdown, but then we are crashing
anyway.

Right now the default # of jobs is 1, so out bots will still run
in serial mode. We want to add parallel mode as an options for
local development while we iron out any last problems with this
approach.

You can test this locally with npm run e2etests -- --jobs=8.

We make use of global setup fixtures to only run one hosted
mode server and share it between all parallel runners. Each
runner still starts its own chrome and restarts it between
files, which is a bit inefficient but still a big improvement
compared to serial mode.

Split the hosted mode server out into its own file inside
conductor as it can be dealt with entirely separately, and
its state is not per-process like the chrome state, but only
per-main-process which launches the test runner sub-processes.

Bug: 1101784
Change-Id: Ic0c9be3559708fd5403a88882b9fb93257633de9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2288694
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2020-11-13 15:20:27 +00:00
Tim van der Lippe 16aca394c5 Update ESLint and related packages
Major update breaking changes:
- ESLint 7.0.0 (https://eslint.org/docs/user-guide/migrating-to-7.0.0) now includes
.eslint.rc.js in its list, which is fine for us. Other changes are not applicable
for us.
- eslint-plugin-mocha (https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md#700-may-13-2020)
drops support for ESLint <7, but this CL updates to 7+. Other changes are
not applicable for us.

DISABLE_THIRD_PARTY_CHECK=Updating ESLint
R=petermarshall@chromium.org

Change-Id: I7760e084ef87f73a92f9ea4e075fb4c065047f5a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2534873
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-11-13 12:28:15 +00:00
Tim van der Lippe bb323cdb1f Fix issues discovered by ESLint 7
We are upgrading ESLint to version 7, which uncovered some issues.

R=petermarshall@chromium.org

Change-Id: I7eb72c6624678c63a9d7701756d326566a303002
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2534872
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-11-13 12:15:35 +00:00
Christy Chen ea635f12e8 [Loc] Migrate devices directory
Migrate Remote Devices tool (devices directory)

(Note: this is a deprecated panel, and it's currently blank, so couldnt test with en-XL)

Bug: 1136655
Change-Id: I8e24de06c295ef8886b788dcacea106be0cb33ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2521685
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-11-11 23:52:09 +00:00
Peter Marshall 4e161dfc4c Update Mocha to 8.2.1
The changes can be seen here between 8.0.1 and 8.2.1:
https://github.com/mochajs/mocha/releases

There are no breaking changes.

The upgrade will give us the ability to use global fixtures which
may speed up parallel mode. I'm also hoping this fixes a bug with
describe.skip() not working properly for parallel mode.

DISABLE_THIRD_PARTY_CHECK=Update Mocha

Bug: chromium:1101784
Change-Id: Ia052a80c0f6dcefb1a2f21444cdfd3789a3203f8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2529149
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2020-11-10 16:16:58 +00:00
Tim van der Lippe 5226a88fe0 Update karma-related packages
This updates karma to 5.2.3, karma-coverage to the officially
published version 2.0.3 (we were previously relying on a git
commit) and karma-sourcemap-loader to 0.3.8.

DISABLE_THIRD_PARTY_CHECK=Update Karma

R=aerotwist@chromium.org

Change-Id: Iaa365379d7c2c6eb9145b1507be1a0a3ae812359
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2527043
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-09 17:42:16 +00:00
Simon Zünd 5f6c0652cc Update TypeScript to 4.1.1-rc
DISABLE_THIRD_PARTY_CHECK="TypeScript update"

R=tvanderlippe@chromium.org

Bug: chromium:1145510
Change-Id: I79473360bc94087d19b5b88091f6255d490c1485
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2517570
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-11-04 14:22:08 +00:00
Christy Chen 2e411e2f84 [Loc] Migrate coverage to Loc V2
- Migrate coverage panel to use LocV2 apis.
- Removed unused grdps

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

Bug: 1136655
Change-Id: Ie5de60d4e62a1496f9642d8eeed0e326727f17d3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2504408
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
2020-11-03 17:06:17 +00:00
Johan Bay f035c3a5de Roll Puppeteer from 5.3.1 to 5.4.1
DISABLE_THIRD_PARTY_CHECK=updating node_modules deps

Change-Id: I6c0d6e92cffbec8c0ee17dcad2aec9cbebdbc29c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512232
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Johan Bay <jobay@google.com>
2020-11-02 13:25:30 +00:00
Tim van der Lippe 6541ce6a4c Add README.chromium to node_modules
This is to make sure that automated tooling correctly deduces that
`node_modules/` hosts third_party content.

DISABLE_THIRD_PARTY_CHECK=NPM infrastructure update
R=adetaylor@chromium.org

Change-Id: Ie7c07cfbff0af461cf6b8774633c1fcc3515d332
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2505134
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Adrian Taylor <adetaylor@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Adrian Taylor <adetaylor@chromium.org>
2020-10-28 17:57:07 +00:00
Jan Scheffler a93c437703 Reland "[Puppeteer] Update puppeteer to v.5.4.0"
This reverts commit 89a6d325b7

Original change's description:
> Revert "[Puppeteer] Update puppeteer to v.5.4.0"
>
> This reverts commit a759e62ec6.
>
> Reason for revert: breaks CQ
>
> Original change's description:
> > [Puppeteer] Update puppeteer to v.5.4.0
> >
> > Change-Id: I831d23e24f840d1898959814809839a34b6b9eb7
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2502001
> > Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
> > Reviewed-by: Mathias Bynens <mathias@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
>
> TBR=aerotwist@chromium.org,mathias@chromium.org,janscheffler@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: Idc901e648ddaba20697c4b4b5d1580f6e07087e6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2503514
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Commit-Queue: Mathias Bynens <mathias@chromium.org>

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


Change-Id: Ib7ffa336327ac5c0b133cd6fc1660d03d16885d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2505652
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-10-28 15:30:47 +00:00
Mathias Bynens 89a6d325b7 Revert "[Puppeteer] Update puppeteer to v.5.4.0"
This reverts commit a759e62ec6.

Reason for revert: breaks CQ

Original change's description:
> [Puppeteer] Update puppeteer to v.5.4.0
>
> Change-Id: I831d23e24f840d1898959814809839a34b6b9eb7
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2502001
> Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

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

Change-Id: Idc901e648ddaba20697c4b4b5d1580f6e07087e6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2503514
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-10-28 07:24:20 +00:00
Jan Scheffler a759e62ec6 [Puppeteer] Update puppeteer to v.5.4.0
Change-Id: I831d23e24f840d1898959814809839a34b6b9eb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2502001
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-27 16:32:38 +00:00
Jack Franklin fee30a1e91 Fix bridges presubmit error not failing presubmit
If we get an unexpected error when re-generating bridges, we log it, but
don't make the actual process error, so the presubmit doesn't error!

This caused an issue to sneak in which https://crrev.com/c/2502042
fixes. Until that CL lands and this is rebased, this CL will fail on the
presubmit.

Change-Id: Ib1a3515ff8c93dfefcf3fa20dbba7c6d8ab9353b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2502044
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-27 12:54:57 +00:00
Jack Franklin 30c4a71de5 Fix component bridges and use of legacy interfaces
The ColorSwatch.ts component uses the `Common.Color.Color` interface.
The bridges generator does not support deeply nested interfaces. So this
CL adds special casing for interfaces that we know we might have to deal
with from "legacy land" and makes sure they still get outputted
correctly.

Currently we only allow nested interfaces that start with `Common.`,
because I'd like to avoid their use in the new world if possible, but we
can easily expand this if required.

Once I got the type being compiled correctly, I then realised that we
also needed to add the imports into the outputted file, so the code now
checks for usage of Common, finds the matching import, and pulls it
over.

Finally, I had to update ColorSwatch.ts. It used public properties, which the
bridge generator doesn't support, so I swapped it to private properties with
getters. I don't love this change, but I think that's better rather than invest
more time in the (temporary) bridge generator code.

Note: this bug made it in because there's a bug in the bridges PRESUBMIT that
means if it errors it doesn't fail the PRESUBMIT. I have another CL incoming to
fix that, but I need to fix the actual component first so that when I fix the
PRESUBMIT I don't just block CQ for everyone!
Change-Id: I7376b0b7bee78bfe9d106fad6e2233a2b04fcf42
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2502042
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-10-27 11:47:27 +00:00
vidorteg c1aeb6318c Reland "Localization: Migrating Settings Folder"
Relanding the migration of the settings folder that was reverted in here:
2479923: Revert "Localization: Migrating Settings Folder" | https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2479923

Also including this fix that is required but was also reverted here:
2476336: Fix missing settings/ModuleUIStrings.js in build config | https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2476336

Change-Id: Ie2335e8943e8be3f8363a45d14c93f3b695222e4
Bug: 1136655
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2481510
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Christy Chen <chrche@microsoft.com>
2020-10-22 16:18:20 +00:00
Jan Scheffler 377d9b3b2b [WebVitals] Add new WebVitals lane
Change-Id: Ibb1095e37a52a39e0718f8f7178787700b965510
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2339321
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-10-22 13:51:29 +00:00
Yang Guo ef36cec5b9 Apply governance change
DISABLE_THIRD_PARTY_CHECK=no code changes
R=bmeurer@chromium.org

Change-Id: I2477c36f5ef2494ccae3efae3f1aee942f365fec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2489420
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2020-10-21 07:54:15 +00:00
Kim-Anh Tran ba5e4813da Adding linear memory inspector navigator component
This adds the navigator component of the linear memory inspector
that is used to navigate through an array buffer.

After: https://imgur.com/a/RPELp6P

Bug: chromium:1110202
Change-Id: Id2acd96222ed11de92cd2a1fb5130ea5d79c9ab5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484363
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-10-20 13:41:04 +00:00
Tim van der Lippe 3387bd4064 Move startup files to GN
There previously were two special files that were handled
by `build_release_applications`: root.js and RuntimeInstantiator.js.
Both files are explicitly part of the startup process of DevTools
and its various entrypoints.

To remove the copying from `build_release_applications`, we have
to move these to the relevant `devtools_entrypoint`. Since a
`devtools_entrypoints` bundles all subdirectories, we can't keep
these files in `front_end/` directly. Instead, we move these files
to `startup/` to denote their special-casing in the startup process.

Next to that, we have to fix all usages of these files in the entrypoints.
For all JavaScript entrypoint files, all side-effect legacy files
that are loaded by `startup.js` (previously known as `root.js` and renamed
to prevent confusion with the `root/` module) are removed. All
"additional" legacy files that a particular entrypoint requires are
still loaded as-is.

The RuntimeInstantiator is moved to become an implementation detail
of `startup/`. Therefore, all of the usages that were previously
importing from `RuntimeInstantiator` now import via `startup.js`.

In the end, the special-casing of these files are removed and renamed
for clarity. In the future, we want to remove the complicated
entrypoints startup process, but we are not ready for that yet.
That will require additional cleanups with `resources` in `module.json`
before that change can happen.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: I198d5a62d2aab70f842c68d9b4c0871fde1587a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2485072
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-20 12:55:34 +00:00
Tim van der Lippe 3c7eedcd60 Remove all definitions of usesObjectNotation
This was a temporary method, used during the migration to use
objects in dispatcher callbacks. Since all dispatchers now receive
the event as an object, we can remove these temporary methods.

R=aerotwist@chromium.org

Fixed: 1138492
Bug: 1011811
Change-Id: Ib7fbfae567ebc9b2be0a5d760458e5b0c7edc12e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484723
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-20 10:59:51 +00:00
Philip Pfaffe 8e8994436d Fix caching in emscripten download script
Change-Id: I14376ad9e9856a28a57ed266fff2a83a1fbeef16
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2485082
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2020-10-20 09:53:30 +00:00
Tim van der Lippe 46e1bcace9 Remove pre_generates_legacy from module.json files
This was a temporary flag used during the build_release_applications
to GN migration.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: I8a772bcc4bee31dbd3270bf7ef62d8c97941024a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484716
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-19 16:12:09 +00:00
Tim van der Lippe d5a0a4c418 Remove rollup_module from build_release_applications
This method is now unused, as all legacy files are copied by GN.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: Ibf74a1ed7752ffb2c38689af71c754242fce2bd0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484715
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-19 16:05:34 +00:00
Tim van der Lippe 150eadfde2 Remove Dispatcher protocol types
These were the old Dispatcher types that were using the exploded
argument method definitions. Since all dispatchers have been
migrated to `ProtocolProxyApi`, we can remove the types from Closure.

R=aerotwist@chromium.org

Bug: 1138492, 1011811
Change-Id: Ic0e19c3e5166d60fbc86d5df9dab28a294e8feba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484721
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-19 16:03:04 +00:00
Philip Pfaffe 3351394f22 Update DEPS and gitignore for building with emscripten
Drive-by: Address post-commit comments from crrev.com/c/2409951

Bug: chromium:1128888
Change-Id: I47a8f0c2deee7db15c574195f45a362c4a6d9fbd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2466179
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2020-10-15 08:14:33 +00:00
vidorteg 6d2775c5ef Modifying scripts for i18nString localization call
Modifying some scripts that verify the shape of localization calls
to work with the i18nString shorthand:

const i18nString = i18.i18n.getLocalizedString.bind(undefined, str_);

Bug: 1136655
Change-Id: I09a961136dd89e8af11ab33f413f315e61184078
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2469903
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Christy Chen <chrche@microsoft.com>
2020-10-14 21:12:22 +00:00
Tim van der Lippe 8fa9d45123 Build common-legacy.js with devtools_entrypoint
To continue to move away from `build_release_applications.py`, move
building `common-legacy.js` into `devtools_entrypoint`. In the end,
it will allow us to remove `_rollup_module` from
`build_release_applications.py`.

The logic in `build_release_applications.py` is updated to assume
a pregenerated `-legacy.js` file based on the `pre_generates_legacy`
option in the `module.json` file. Once all `-legacy.js are migrated,
we can remove this option once again.

To make sure that we Rollup properly, we should assume that an
entrypoint in the same folder is regarded as external. Otherwise,
we would rollup the contents of `common.js` into `common-legacy.js`,
which is not what we want.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: Idcda3e1c2436a0bebb36501523c8d586d6e86fac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2450297
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-14 11:42:10 +00:00
Tim van der Lippe 67c4ae8e03 Only include legacy file into _module.js bundle if required
For all `_module.js` files, we currently copy all `modules` into
the `module.json` metadata. However, since then the Runtime got
updated to always load the entrypoint. This is possible, because
in release modes only the entrypoint exists and all other files
are removed.

Therefore, we can use an empty array to denote that solely the
entrypoint should be loaded by the Runtime. If however the module
has a legacy file, the Runtime needs to load that instead. (See
`Runtime._loadModules` for more information) Therefore, include
solely the legacy file to the metadata information in the
`_module.js` to load it.

Eventually, this will allow us to remove the files from the modules
array in the `module.json`, as only Closure would require that
information.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: Ie14bd55b29b356a39aad7e8ca2041c979bd1b2cb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2461783
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-14 08:58:50 +00:00
Jack Franklin 102df67838 Fix component bridges tests
A recent TS config change elsewhere had caused these tests not to
compile with the error of:

```
error TS6307: File '/Users/jacktfranklin/src/devtools/devtools-frontend/scripts/component_bridges/value_for_type_node.ts' is not listed within the file list of project '/Users/jacktfranklin/src/devtools/devtools-frontend/test/unittests/scripts/component_bridges/tsconfig.json'.
```

The fix is to mark the dependency from the unit tests as a TS project
reference, and then generate output in the same place as the source, so
that import paths don't need to change.

This isn't ideal, and we would use ts_library if doing this now, but
this code pre-dates ts_library and also is only going to be around for
the length of the TypeScriptification work, so it doesn't feel worth the
effort to restructure it.

Change-Id: I9a924bf3e2ed945dd22ce233eda2c8c15f3193c6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2466188
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2020-10-13 10:35:14 +00:00
Christy Chen 5a23b94362 Fixing two localization presubmit issues
1. Don't generate grdp strings if they are in ModuleUIString.js
2. Use path.basename instead of index slicing when getting the directory name for a filepath

Bug: 1136655
Change-Id: I828461a4be2dbeaecd4db76eeb13fce53871d16f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2461794
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2020-10-09 17:20:24 +00:00
vidorteg 8bce4b0b83 Enable ModuleUIStrings as a fallback in i18n
Root cause:
i18n is designed to work with strings that are declared in a UIStrings
object on the SAME file where they are being used. To my best knowledge
this is done to improve performance when searching for a translation,
but in Devtools there are strings that live in module.json files and
are exposed to i18n via a ModuleUIStrings.js file.

Fix:
There is already a mechanism for this kind of templating in the i18n
library which exposes a small subset of translations that match a
specific pattern, the fix is to change this pattern to match
ModuleUIStrings and to also include this as part of the translation
resolution.
Change-Id: If44a84a9b5892558bf832e6d08ea36d1a8f4ddd1
Bug: 1136655
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2459638
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-10-09 01:57:37 +00:00
vidorteg ca8fc9b475 Removing check_localizability.js verification
The current behavior enforces that the second argument passed to all
i18n.getLocalizedString is part of UIStrings structure, this is not
possible to enforce in the current shape as a reference is also a valid
scenario

--------  e.g-----------

const title1 = UIStrings.title1;
const title2 = UIStrings.title2;

function render(title) { i18n.getLocalizedString(str, title) }

--------  end e.g-----------

Also minor fix in the naming convention of the file (localizationV2checks)

Change-Id: I9e7536850f7bbb73b2e27f5906343b3b1dbfd82d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2451369
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2020-10-07 16:46:15 +00:00
Dirk Pranke 75443e831f Python3-related fixes for the devtools build.
This CL addresses a few issues that will help make it possible
to build Chromium using Python 3.

Nothing in this CL should cause any functional changes, and
Python 3 is not required (indeed, won't even work yet), but
this CL will be needed to unblock other work.

See https://crrev.com/c/2333868 for the roll-up Chromium patch,
which also has multiple other dependencies.

Bug: 1112471
Change-Id: Ica8a5b2b24674e1abd267bcd558b7101a6da6fc5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2330718
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
2020-10-03 17:14:03 +00:00
Jack Franklin c1501227b3 Component docs server only lists HTML files
Fix the component docs server to only generate iFrame examples of HTML files,
allowing any helper files (e.g. helper scripts/CSS/imgs/etc) to be placed
alongside the examples without being linked to.

Fixed: 1132846
Change-Id: I9680f001bda4fb2f00eebc275729e66ac62f4189
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2443615
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-02 10:53:00 +00:00
Philip Pfaffe 02376092a3 Download emscripten-releases binaries for building wasm tests
This CL adds a DEPS hook that will download tagged emscripten-releases
binaries from googlestorage that will be used to build wasm debugging
tests.

Bug: chromium:1128888

Change-Id: Ib5d0488fe3fe2c3514faa9f76b07e84c51296c25
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2409951
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2020-09-29 11:28:38 +00:00