Commit Graph
198 Commits
Author SHA1 Message Date
Christy Chen 1ab87e04c9 Fixed localization presubmit command line too long error
In presubmit.py, _CheckDevtoolsLocalization() gets all the paths of affected files and pass those in as arguments when running run_localization_check.py. When a lot of files need to be scanned, it casus the issue where character number exceed the limit of CreateProcess on Windows.

This PR changes the _CheckDevtoolsLocalization() to create a temp file that contains the affected file paths, and have the validation step read the affected file paths from the temp file.


Bug: 941561
Change-Id: I698e5064287eee8a8a3aca0682e3ab3521eb63d1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2032086
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2020-01-31 23:01:04 +00:00
Tim van der Lippe 912cec0c68 Add istanbul-diff to node_modules
DISABLE_THIRD_PARTY_CHECK=Adding istanbul-diff to node_modules

Bug: chromium:1044881
Change-Id: Ia80f499622132ce9b2c0890147fecdd4530886c7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2024871
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-01-28 15:21:23 +00:00
Brandon Goddard 53faba1c7d Reland "Add script that checks license headers of JavaScript files"
This reverts commit 27f15d113a.

Reason for revert: script is fixed on Windows

Original change's description:
> Revert "Add script that checks license headers of JavaScript files"
>
> This reverts commit 6122ebd2f9.
>
> Reason for revert: Presubmit fails on windows due to relative
> path comparison with excluded files
>
> Original change's description:
> > Add script that checks license headers of JavaScript files
> >
> > The script checks if the license header is the BSD-3 license header that
> > DevTools is licensed under. It excludes files that have license headers
> > that reference non-Google/non-Chromium authors or are third_party
> > bundles that are checked into a non-third_party folder.
> >
> > Change-Id: I35f78036b48d3d7b7dcb9db1e070691282e27a02
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016747
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Liviu Rau <liviurau@chromium.org>
> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
>
> TBR=bmeurer@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org,liviurau@chromium.org
>
> Change-Id: Idc27e9b78d5ac314176c71f8f4a7a2257da08be9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019019
> Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
> Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
> Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>

TBR=bmeurer@chromium.org,aerotwist@chromium.org,lomitch@microsoft.com,brgoddar@microsoft.com,tvanderlippe@chromium.org,liviurau@chromium.org

Change-Id: I191665c8e3fdbee7f3c5c312b5ba00513502e080
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019021
Reviewed-by: Fabio Rocha <fabio.rocha@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
2020-01-24 18:16:35 +00:00
Brandon Goddard 27f15d113a Revert "Add script that checks license headers of JavaScript files"
This reverts commit 6122ebd2f9.

Reason for revert: Presubmit fails on windows due to relative
path comparison with excluded files

Original change's description:
> Add script that checks license headers of JavaScript files
> 
> The script checks if the license header is the BSD-3 license header that
> DevTools is licensed under. It excludes files that have license headers
> that reference non-Google/non-Chromium authors or are third_party
> bundles that are checked into a non-third_party folder.
> 
> Change-Id: I35f78036b48d3d7b7dcb9db1e070691282e27a02
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016747
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>

TBR=bmeurer@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org,liviurau@chromium.org

Change-Id: Idc27e9b78d5ac314176c71f8f4a7a2257da08be9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019019
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
2020-01-24 16:50:05 +00:00
Tim van der Lippe 22a64d3fe4 Update replace-internal-references to accept multiple folders
This allows us to specify multiple folders at the same time, doing only
1 pass per folder.

Bug: 1006759
Change-Id: I522249c3490f36c7d856a56c992d0393cc9738e4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2018945
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-24 13:46:38 +00:00
Tim van der Lippe 64a94d8105 Migrate object_ui/ to import cross-module
Bug: 1006759
Change-Id: Ic6a53e6183e3621771c019c4c9692c072f812736
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019123
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-24 12:13:48 +00:00
Tim van der Lippe 6122ebd2f9 Add script that checks license headers of JavaScript files
The script checks if the license header is the BSD-3 license header that
DevTools is licensed under. It excludes files that have license headers
that reference non-Google/non-Chromium authors or are third_party
bundles that are checked into a non-third_party folder.

Change-Id: I35f78036b48d3d7b7dcb9db1e070691282e27a02
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016747
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-01-24 11:51:49 +00:00
Mandy Chen 40720b1f80 Fix type checking script on windows
On windows, result of path.join() contains double back slashes, e.g.
>>> path.join('sdk', '../SupportedCSSProperties.js')
'sdk\\../SupportedCSSProperties.js'
But in run_type_check.py, it expects paths to contain forward slashes.
This CL updates the equlity checks to call path.join() as well so the
script works on windows.

Change-Id: Id2e9bca6e2f11403f5520892581eaaa8392613da
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2017917
Reviewed-by: Fabio Rocha <fabio.rocha@microsoft.com>
Reviewed-by: Brian Cui <brcui@microsoft.com>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
2020-01-24 02:30:57 +00:00
Tim van der Lippe 0c42b5bb12 Add recast to node_modules/
It will be used in a check to enforce license headers

DISABLE_THIRD_PARTY_CHECK=Adds recast to node_modules

Change-Id: I822a368d9ba22058ac2586ea3638089a2f5b1d18
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016746
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-23 13:38:45 +00:00
Tim van der Lippe ddbec81f2d Map imports to Protocol to ProtocolModule
There is a name-clash on the Closure type-defs generated from CDP, which
also use the Protocol namespace. Therefore, for es-imports we should use
`import * as ProtocolModule` instead.

Bug: 1006759
Change-Id: I1e7e92825fdafe56c4f5274e520650001789014c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016755
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>
2020-01-23 13:22:20 +00:00
Tim van der Lippe 4d1ddf7f73 Migrates protocol/ to ESM internally
Bug: 1006759
Change-Id: I99743fcf3d33bc1e5a3b729c2c544826e1d8e923
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2013156
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-23 13:19:20 +00:00
Mathias Bynens b0693f217f Improve npm run debug-test output
Previous output:

```
Running web tests with args: ~/projects/chromium/src/third_party/blink/tools/run_web_tests.py,inspector*,http/tests/inspector*,http/tests/devtools,--build-directory,~/projects/chromium/src/out,--target,Release,--additional-driver-flag=--debug-devtools,--additional-driver-flag=--remote-debugging-port=9222,--time-out-ms=6000000,runtime/runtime-evaluate-bad-unicode.js
```

This patch changes the output to:

```
Running web tests with args: ~/projects/chromium/src/third_party/blink/tools/run_web_tests.py inspector* http/tests/inspector* http/tests/devtools --build-directory ~/projects/chromium/src/out --target Release --additional-driver-flag=--debug-devtools --additional-driver-flag=--remote-debugging-port=9222 --time-out-ms=6000000 runtime/runtime-evaluate-bad-unicode.js
```

This way, the output contains the actual command that's being run, making it more readable and copy-paste friendly.

Change-Id: Ib5341514f3802937a052f1c5d257e45ee64c17a9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016751
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-23 12:34:31 +00:00
Paul Lewis b8b3801b10 Adds e2e scripts and 'Hello, World' test
Bug: 1044632
Change-Id: I1f6c75c0c03f7f03cb2e8e92e8766af0c8444057
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2007505
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-01-22 17:23:15 +00:00
Paul Lewis 2e45f00d36 Fix JS config script
Change-Id: I5cec137f40e4c3decf9ac9723054220d85d6926b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2014920
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-22 16:40:54 +00:00
Tim van der Lippe e4974ddc4c Remove whitespace at the end of the package.json lines
json.dump appears to add extraneous spaces before newline characters. By
specifying the separators option, we can remove these whitespaces,
reducing the diff noise. Solution taken from
https://stackoverflow.com/questions/16311562/python-json-without-whitespaces

DISABLE_THIRD_PARTY_CHECK=Fix whitespace in node_modules

Change-Id: I26556e5053f19a9021ad41779319bdfe3f8c2b6c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2013154
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>
2020-01-22 15:17:25 +00:00
Tim van der Lippe 6d1e03c598 Reland "Migrate accessibility/ to ESM internally"
This reverts commit 5a8f4d89e1.

Reason for revert: Use fix as we did for CSSProperties

Original change's description:
> Revert "Migrate accessibility/ to ESM internally"
>
> This reverts commit 785c6a4f1c.
>
> Reason for revert: Suspected to break "run_type_check.py" on the bot.
> https://ci.chromium.org/p/chromium/builders/try/linux-rel/279842
>
> Original change's description:
> > Migrate accessibility/ to ESM internally
> >
> > Bug: 1006759
> > Change-Id: I9d801349fd73a06d7f72933acfa65b103531a278
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991511
> > Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
>
> TBR=aerotwist@chromium.org,tvanderlippe@chromium.org
>
> Change-Id: Ie4fe54b84cf91cd034bfdb21c20b97eaacdb3599
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1006759
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1994960
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

Bug: 1006759
Change-Id: I7e3b3eafd608aa2fa7d05319a9ff0d4947a2dc88
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2013148
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-22 14:48:24 +00:00
Paul Lewis 7b1e0f41ab Adds Puppeteer types
DISABLE_THIRD_PARTY_CHECK=Updates the deps list as well as the node_modules

Change-Id: Ia9a6d26a89d85c0ca24253892ec3aa2858fe034a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2009108
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-20 14:02:00 +00:00
Tim van der Lippe bcf142a3e1 Update TypeScript to latest version
DISABLE_THIRD_PARTY_CHECK=Updates the deps list as well as the node_modules

Bug: 1011811
Change-Id: I09c38caa2b60f8f291695a908a3363dd870f5625
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2009109
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>
2020-01-20 11:58:10 +00:00
Tim van der Lippe 9293af7230 Migrate sdk/ to ESM internally
Bug: 1006759
Change-Id: I2bb0c8eaa4fdc89edd8da2b12d9fd0e08d427174
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003327
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-17 15:17:17 +00:00
Tim van der Lippe f86acf8203 Remove Puppeteer installation
We can set the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD environment variable to
not install a local Chromium installation. Update the preinstall script
to verify that this variable is set. If you want to update the deps, you
can now run `npm run install-deps` to get the update.

DISABLE_THIRD_PARTY_CHECK=Fixing node_modules

Change-Id: I6d77a77f343f8869a17434e7b83951b6380444d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003319
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-16 13:32:46 +00:00
Tim van der Lippe 399a956776 Reland "Use typescript-eslint instead of tslint"
This reverts commit 72da1a51cb.

Reason for revert: Buildbots in Chromium no longer run the linter checks.

Original change's description:
> Revert "Use typescript-eslint instead of tslint"
> 
> This reverts commit d0e22da4db.
> 
> Reason for revert: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8891272266464063200/+/steps/devtools_lint_check__with_patch_/0/stdout
> 
> Original change's description:
> > Use typescript-eslint instead of tslint
> >
> > This will update our eslint configuration to use @typescript-eslint to
> > parse and lint TypeScript files. It integrates with the existing
> > infrastructure to lint our files
> >
> > Fixed: 1041811
> > Change-Id: I29f49a57229e3ee17524045b3905b9cc835271ab
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1998771
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> 
> TBR=aerotwist@chromium.org,tvanderlippe@chromium.org
> 
> Change-Id: Ic0dfc585cd0ac08f1f4a72ce19d0bebc74f9cdb5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2000795
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I623c9b873ac0af3157ff3b73c91e006f7db58e1e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003315
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-16 10:58:49 +00:00
Tim van der Lippe 0cfd3dc2af Update remove global scripts to run on legacy files
Also make sure we take into account the layout tests

Bug: 1006759
Change-Id: I6b819876034aae7019e62b1b34ca6adeb50326b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2002606
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-16 10:35:44 +00:00
Tim van der Lippe e6a9868686 Migrate javascript_metadata/ to ESM internally
Bug: 1006759
Change-Id: Ibb7c4fb15197431c37c485bd1a05b20acf2bf098
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1994967
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-15 15:27:13 +00:00
Tim van der Lippe 72da1a51cb Revert "Use typescript-eslint instead of tslint"
This reverts commit d0e22da4db.

Reason for revert: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8891272266464063200/+/steps/devtools_lint_check__with_patch_/0/stdout

Original change's description:
> Use typescript-eslint instead of tslint
>
> This will update our eslint configuration to use @typescript-eslint to
> parse and lint TypeScript files. It integrates with the existing
> infrastructure to lint our files
>
> Fixed: 1041811
> Change-Id: I29f49a57229e3ee17524045b3905b9cc835271ab
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1998771
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

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

Change-Id: Ic0dfc585cd0ac08f1f4a72ce19d0bebc74f9cdb5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2000795
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-14 17:57:10 +00:00
Paul Lewis 21fb34999d Adds PRESUBMIT check for .only calls in Karma tests
Change-Id: I9355592d74777c9136eb50edd3fd08bc1b9e2c3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2000786
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-14 15:37:28 +00:00
Tim van der Lippe d0e22da4db Use typescript-eslint instead of tslint
This will update our eslint configuration to use @typescript-eslint to
parse and lint TypeScript files. It integrates with the existing
infrastructure to lint our files

Fixed: 1041811
Change-Id: I29f49a57229e3ee17524045b3905b9cc835271ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1998771
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-14 13:32:48 +00:00
Tim van der Lippe 984c7d7608 Add typescript-eslint to node_modules
Bug: 1041811
Change-Id: Id9820054e67f8402a4a1220035d8789f7cff5a0b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1998769
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-14 12:34:56 +00:00
Tim van der Lippe 383de766af Fix check for nested directories in check_gn
Any module.json that was listed in a nested folder (for example in
third_party/) was not properly being checked in the check_gn script. We
should traverse not only the direct directories of `front_end/`, but
also recurse into any of its subdirectories.

Bug: 1041415
Change-Id: I6c4adbf4315c30b3d90361329d726323020308a7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1997352
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
2020-01-14 10:20:07 +00:00
Rob Paveza 41120592d3 Refactor of the 'copy_all_modules' build step
I've sporadically seen the same CreateProcess failure in ninja recently
that we'd been seeing for the GRD script [1]. This failure is related to
the copy_devtools_modules script.

As part of this change I've also corrected some linting errors that I
had made with the previous fix.

[1] The previous fix can be found at
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1992319

Change-Id: Ic9a66160acddfc929fdd43f20572435ceff3724c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1997723
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-13 19:07:47 +00:00
Simon Zünd 5a8f4d89e1 Revert "Migrate accessibility/ to ESM internally"
This reverts commit 785c6a4f1c.

Reason for revert: Suspected to break "run_type_check.py" on the bot.
https://ci.chromium.org/p/chromium/builders/try/linux-rel/279842

Original change's description:
> Migrate accessibility/ to ESM internally
> 
> Bug: 1006759
> Change-Id: I9d801349fd73a06d7f72933acfa65b103531a278
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991511
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

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

Change-Id: Ie4fe54b84cf91cd034bfdb21c20b97eaacdb3599
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1006759
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1994960
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-01-10 06:01:18 +00:00
Paul Lewis b4e2a0741b Check for self.X = self.X || {} in migration script
Bug: 1006759
Change-Id: I741093c412e6ef47b0154b0202bda56ffd07328c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1993460
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-09 17:11:01 +00:00
Paul Lewis 785c6a4f1c Migrate accessibility/ to ESM internally
Bug: 1006759
Change-Id: I9d801349fd73a06d7f72933acfa65b103531a278
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991511
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-09 17:06:11 +00:00
Tim van der Lippe 472675db85 Migrate data_grid/ to ESM internally
Bug: 1006759
Change-Id: Idb20304bcf3e72e4a0bba242e847e90ff9b8a8c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1993342
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-09 15:04:51 +00:00
Liviu Rau e5cecd6c52 Revert "Whitespace to trigger builders"
This reverts commit 3aa0411a4c.

Reason for revert: To trigger builders

Original change's description:
> Whitespace to trigger builders
> 
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: I96ea4d7ba12b5b5e884f2fb7f5781afa4a9c1564
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991505
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@chromium.org>

TBR=machenbach@chromium.org,sigurds@chromium.org,mathias@chromium.org,liviurau@chromium.org

Change-Id: I133c6f3e3bdb86884c13ab41b6c82be3064d882d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991509
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2020-01-09 12:05:43 +00:00
Liviu Rau 3aa0411a4c Whitespace to trigger builders
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I96ea4d7ba12b5b5e884f2fb7f5781afa4a9c1564
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991505
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2020-01-09 11:35:52 +00:00
Rob Paveza 4947355c94 Fix for too-long length of command line in Windows build.
Apparently related to the changes to ESM, the Windows build command
line has started to exceed 32kb. This is running into a fault within
ninja in which the call to CreateProcess fails as a result of the
command line being an invalid parameter.

This fix addresses it by dumping the file list into a GN "response
file" which is then fed into the corresponding Python script, as
indicated by the GN docs. See:
https://gn.googlesource.com/gn/+/master/docs/reference.md#var_response_file_contents

Bug: 1040233
Change-Id: Ie421a09d2a23756e9195e3ad84b941187de6e3c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1992319
Reviewed-by: John Emau <John.Emau@microsoft.com>
Reviewed-by: Mike Jackson <mjackson@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
2020-01-08 22:17:55 +00:00
Tim van der Lippe 0c21af5553 Use module scope for workers
This changes the Common.Worker to create Workers that use the module
scope rather than the global scope. It allows us to use es-imports,
which consequently allows us to remove the bundling during the build
step. This should hopefully improve the Ninja non-determinism that we
were facing when making changes to files that are used in the various
workers.

Bug: 1006759
Change-Id: I7ac209817b1576d2accd790f1bf7ef6a658f5605
Fixed: 1013129
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1981615
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-08 15:12:05 +00:00
Liviu Rau 5dfaec1dad Whitespace to trigger builders
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Id2b4cab8b2f1176ff6c7221826c5ecbbb5315126
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1967164
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2020-01-08 09:46:13 +00:00
Paul Lewis 25b001799e Adds known errors to include expanded namespace
Dupes the known errors for the Common.UIString.UIString namespace to
match the existing Common.UIString case.

Bug: 1006759
Change-Id: Ibf5a7ec632d43fca56d198b05a93ca6e79621388
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1985675
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-06 16:25:44 +00:00
Paul Lewis d0015fb415 Adds support for additional localization calls
As part of the ESM migration, certain function needs to be renamed over
to a different namespace, e.g. Common.UIString becomes
Common.UIString.UIString. As such the script that looks for instances of
Common.UIString for localization fails to identify instances of the
updated calls to Common.UIString.UIString. This CL updates
localization_utils so that it is aware of the updated namespaces, but
treats them in the same way as their legacy counterparts.

Bug: 1006759
Change-Id: I0a7da9109ee969da4caac3283c4ff26f4589f68a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1985674
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-06 15:37:33 +00:00
Connor Moody 46dee06f38 Normalize excluded file paths in check_gn.js to fix presubmit checks on Windows
CL http://crrev.com/c/1969473 introduced the check_gn script to augment presubmit checks. The checks are currently failing on Windows because excluded file paths (formatter_worker/) are not normalized.

This CL normalizes excluded file paths so that all checks pass on Windows.

Change-Id: Ic5848d6eb9706934152445e4b5752be25ac84e07
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1974795
Reviewed-by: Brian Cui <brcui@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Connor Moody <connor.moody@microsoft.com>
2019-12-19 17:18:48 +00:00
Tim van der Lippe ac961dd56b Fix check_gn and add it to check script
check_gn will now properly check the contents of all_devtools_modules and copied_devtools_modules in the BUILD.gn.
We don't ship the wasm_source_map/types.js, as it only includes information for Closure.
Therefore, remove this file from the `modules` array and append it in Closure instead.

Fixed: 1033882
Change-Id: I3361096941869d39ce3b717327c4001d146a5286
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1969473
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-16 14:29:28 +00:00
Michael Achenbach ebb091f654 Whitespace change to test build numbers
Tbr: santa
Change-Id: Id86ddf8253e7269448d0170af4dd3c8fd71e14de
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1967165
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
2019-12-16 08:43:56 +00:00
Mathias Bynens f885d2e6f8 Prefer Brotli over gzip for compressing webui resources
This makes resources.pak another 228.1 kB smaller (from 7,070,021
bytes down to 6,841,901 bytes).

Bug: chromium:1025041
Change-Id: I0d45e3b40f5765bcb5c2266750698d33b6adcae2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1964350
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2019-12-12 14:36:14 +00:00
Mathias Bynens 4d4e51aa31 Set compress='gzip' for SVG resources
This saves some more bytes in the total image size, which is important for Chrome OS.

Follow-up to:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1918736

Bug: chromium:1025041
Change-Id: I01167d35ae6d693428dfd44252b7f86940f416b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962301
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-12 13:41:04 +00:00
Steven Bennetts 457ff4a215 Set compress='gzip' for webui resources
This adds the compress="gzip" entry to webui (html, js, css) files in
devtools_resources.grd.

This will save 4.8 MB in the image size, which is critical for
Crhrome OS.

Bug: chromium:1025041
Change-Id: I0357fc1cc677f83f1f36fb39ca586543e37d124c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1918736
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
2019-12-12 12:54:23 +00:00
Liviu Rau 7ea9d9dd0f Whitespace to trigger builders
TBR:yangguo@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I25417f546ff76ad6b3a10a7d29ee823b0bc3fa73
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962294
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2019-12-12 11:06:03 +00:00
Changhao Han b8b4fef645 Autogenerate CSS autocomplete values with extra manual entries.
Bug: chromium:1021810
Change-Id: Ifd6ed31b31c61fc5b509ffe049d961cc68e7bcc4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953616
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2019-12-11 15:38:04 +00:00
Paul Lewis 26afc1e4f9 Adds migration script for refs
This script expects that -legacy.js files are in place for a
given module. So, for example, if migrating front_end/search
one would run move-side-effects-to-legacy for search, then follow
that with this script, replace-internal-references, which will
step through the files in front_end/search and update all globals
to refer to imports.

This script also supports cross-module rewrites, such that if a
namespace is passed through, the -legacy.js file for the namespace
will be loaded instead and used for the replacements.

Bug: 1006759
Change-Id: I7af5e1343a028aed82d5c3f536be886011cf9a2c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1958525
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-10 13:47:05 +00:00
vidorteg 7a077810bd Updating paths on generate_devtools_ui_strings.js
Localization scripts got moved from localization_utils to
localization/utils, this script needs to be updated to reflect the
change.

Change-Id: I0a942d928687e3df767e508b25a286be026f0dcb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1959090
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2019-12-10 00:11:50 +00:00