Commit Graph
132 Commits
Author SHA1 Message Date
Tim van der Lippe d1cfda327d Migrate text_editor/ and cm_web_modes/ to ESM
cm_web_modes/ was used both in a worker and in the normal browser
context. However, both formatter_worker/ and text_editor/ included the
relevant files in their scripts array.

The fix is to make cm_web_modes a proper module and import either the
browser (_cm.js) variant or the worker (_headless.js) variant.

Bug: 1006759
Change-Id: I85c6f67102d8ffd94e073850b1ac7adcb289b1b2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1934218
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-27 14:12:52 +00:00
Liviu Rau 38acde4f55 [devtools] Whitespace to test devtools recipe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1018837
Change-Id: Id606852ee0c9cf3df215866a08183f479cfc7157
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1903467
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Auto-Submit: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2019-11-27 12:48:29 +00:00
Andrey Kosyakov fff69a79f9 Reland "Update roll & type check scripts with new browser_protocol.pdl location"
This reverts commit db38f98828.

Reason for revert: re-landing as upstream change appears to stick this time.

Original change's description:
> Revert "Update roll & type check scripts with new browser_protocol.pdl location"
> 
> This reverts commit a4d8446198.
> 
> Reason for revert: Upstream change that this depends on got reverted: https://chromium-review.googlesource.com/c/chromium/src/+/1935479
> 
> Original change's description:
> > Update roll & type check scripts with new browser_protocol.pdl location
> > 
> > This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/1898538
> > to update the location of the browser_protocol.pdl.
> > 
> > NOPRESUBMIT=true
> > Bug: https://crbug.com/1018108
> > Change-Id: Id21b5bc65d6af472b55151a458beca34dabc6d1d
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1904098
> > Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> 
> TBR=caseq@chromium.org,yangguo@chromium.org
> 
> Change-Id: I276ca14aa57ed6dcfd76946c8bee9ea580643b6b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://crbug.com/1018108
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1936211
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>

TBR=caseq@chromium.org,yangguo@chromium.org

Change-Id: Icb1d908317514f15a80fb8edc84974045309487e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://crbug.com/1018108
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1938351
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
2019-11-27 01:32:58 +00:00
Paul Lewis ea12f14458 Migrates javascript_metadata/ to esm
Bug: 1006759
Change-Id: I91c9f30d63e36995e7fa14b49072f2dcc6c37af6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1937028
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-26 17:16:06 +00:00
Yang Guo db38f98828 Revert "Update roll & type check scripts with new browser_protocol.pdl location"
This reverts commit a4d8446198.

Reason for revert: Upstream change that this depends on got reverted: https://chromium-review.googlesource.com/c/chromium/src/+/1935479

Original change's description:
> Update roll & type check scripts with new browser_protocol.pdl location
> 
> This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/1898538
> to update the location of the browser_protocol.pdl.
> 
> NOPRESUBMIT=true
> Bug: https://crbug.com/1018108
> Change-Id: Id21b5bc65d6af472b55151a458beca34dabc6d1d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1904098
> Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>

TBR=caseq@chromium.org,yangguo@chromium.org

Change-Id: I276ca14aa57ed6dcfd76946c8bee9ea580643b6b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://crbug.com/1018108
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1936211
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-11-26 09:37:09 +00:00
Andrey Kosyakov a4d8446198 Update roll & type check scripts with new browser_protocol.pdl location
This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/1898538
to update the location of the browser_protocol.pdl.

NOPRESUBMIT=true
Bug: https://crbug.com/1018108
Change-Id: Id21b5bc65d6af472b55151a458beca34dabc6d1d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1904098
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-11-26 00:34:04 +00:00
vidorteg 75c025e894 Reland "Do not require arguments to run run_localization_check.py"
Relanding a PR that was disabled due exposing a bug in esprima
that has already been addressed in:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931277

Bug: 1027052
Change-Id: I7262f01b545b7d8ab49cd6e8853f9f232b3d72e1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1929110
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-11-25 19:26:14 +00:00
vidorteg 2b675b05ee Reland "Revert "Adding run_localization_check.py""
This change relands Adding run_localization_check.py which exposed
a bug in esprima that has been fixed in here:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931277

Bug: 1027052
Change-Id: I93a406a15cf5ba21b3a594e8a8593e49518c9a90
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931279
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-25 18:08:44 +00:00
vidorteg e3e3cdb826 Excluding JSON files from check_localizability.js.
Root:
Esprima has a bug parsing JSON files that contain string literals as the
name, even though it is valid according to the JSON standard
http://www.json.org/

Expected:
Parsing the following snippet should not throw an error
{
    "name":"value"
}

Actual:
Unexpected token ":"


Fix:
Exclude json files from being parsed by esprima


Bug: 1027052
Change-Id: Ic3c4786af36511852c9729b8313a370d32b654df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931277
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
2019-11-25 17:56:54 +00:00
Paul Lewis cf2ef223cd Migrates audits/ to esm
Bug: 1006759
Change-Id: I3725508476779ed9002ace9f2c5bf57aaeb0b2c9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1928919
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-11-22 15:25:31 +00:00
Michael Hablich 7fa83680cc [Infra] Whitespace change for testing
Bug:1021467
Change-Id: I1544fda08001fa5b3613c2224794f70d30865b3d
TBR=yangguo@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1928912
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Michael Hablich <hablich@chromium.org>
2019-11-21 10:05:54 +00:00
Paul Lewis 954a5a9d92 Revert "Adding run_localization_check.py"
This reverts commit 402078e2f9.

Reason for revert: run_localization_check.py breaks the PRESUBMIT for any CLs which contain json files, i.e. module.json.

Original change's description:
> Adding run_localization_check.py
> 
> It will run the two localization verifications:
> - It will tell if the resource files are formatted in the correct way
> - It ill tell if any localizable resource in the code is present with the
> appropiate attributes in the resource files.
> 
> This two verifications already run as part of the presubmit verifications,
> I did some refactoring to allow them to be run from an external script.
> 
> Change-Id: I340e5dcfdeef7331a757adf27cef94e22302cf10
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1894913
> Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
> Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>

TBR=lomitch@microsoft.com,vidorteg@microsoft.com

Change-Id: I0f2dfa1e071a0302414cf38ccbdf86ca772b3ec1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1926496
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-20 15:34:28 +00:00
Paul Lewis 18c3d3cd0f Revert "Do not require arguments to run run_localization_check.py"
This reverts commit 1d181da138.

Reason for revert: run_localization_check.py breaks PRESUBMIT for any json files. Reverting this as it builds on top of the original CL which introduced run_localization_check.py

Original change's description:
> Do not require arguments to run run_localization_check.py
> 
> Also conform to convention for command line argument naming
> 
> R=​szuend@chromium.org
> 
> Change-Id: I4a2288d2b8315d816b338863c3ccf51f44c2ab9d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1925054
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

TBR=yangguo@chromium.org,szuend@chromium.org

Change-Id: Icbad9da9cf631d1dee0d173415488535bb01e155
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1926495
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-11-20 15:32:49 +00:00
Yang Guo 1d181da138 Do not require arguments to run run_localization_check.py
Also conform to convention for command line argument naming

R=szuend@chromium.org

Change-Id: I4a2288d2b8315d816b338863c3ccf51f44c2ab9d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1925054
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2019-11-20 14:01:24 +00:00
e52a82bdfb5106bd658c2c5ea465e200 402078e2f9 Adding run_localization_check.py
It will run the two localization verifications:
- It will tell if the resource files are formatted in the correct way
- It ill tell if any localizable resource in the code is present with the
appropiate attributes in the resource files.

This two verifications already run as part of the presubmit verifications,
I did some refactoring to allow them to be run from an external script.

Change-Id: I340e5dcfdeef7331a757adf27cef94e22302cf10
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1894913
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2019-11-19 23:23:49 +00:00
Yang Guo ad4f252783 Ensure building again is a no-op
GN does not handle timestamps well if an action that is not copy
copies or symlinks files. Work around this by using a build stamp
file.

R=szuend@chromium.org

Bug: 1012239
Change-Id: I81da7d206f71031d401ffa38beac7983eb732c14
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1924188
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-11-19 12:27:04 +00:00
Sigurd Schneider aa133ed096 [scripts] Fix path in dtrun
Change-Id: I47ee448d1ddbe57046451d57062f8c95e380dc09
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1919343
Auto-Submit: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
2019-11-17 14:56:34 +00:00
Yang Guo 0802bf5001 Fix running unit tests on Win and Mac
Change-Id: Ie87490a21cc0af5188d31a1a89c567895f925372
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1908568
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
2019-11-11 14:46:05 +00:00
Tim van der Lippe c40495063d Migrate cm/ to ESM
roll CodeMirror

Bug: 1006759
Change-Id: I1eee7cbb8f50ca0637828a82531663a371a20044
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1903474
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-10 01:08:53 +00:00
Tim van der Lippe 601965061c Migrate diff/ to ESM
Bug: 1006759
Change-Id: I63577385ecd6c91b9843dfafc669317adb76d88a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1903475
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-09 23:31:53 +00:00
Paul Lewis f16142c532 Migrate accessibility/ to esm
Bug: 1006759
Change-Id: I9544f28e103acf0869cd6b3d98681b5788498ae0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893084
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-07 18:06:05 +00:00
Paul Lewis 3940ef25f1 Move data_grid over to ESM
Bug: 1006759
Change-Id: I02a7fc01bff612cf057c918df7449734bba241b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893076
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-07 14:42:25 +00:00
Tim van der Lippe fd90361fad Rollup workers and migrate dependent modules
Since workers do not support modules [1], it is not possible to
currently import any ESM DevTools module. To be able to migrate
text_utils/ to ESM, we would need to duplicate a large portion of
text_utils/, which would be unmaintainable.

We already had the same situation when we migrated platform/ to ESM and
decided to copy the relevant functions, but this time around that is no
longer an option.

Thus, the 2 workers (heap_snapshot_worker and formatter_worker) are now
being bundled on build time. This means that in a release build, the
respective entrypoints are bundled and inserted in the output.

To bundle, we use `rollup`, which is a bundler only concerned with
rolling up ES modules. All other functionality of rollup (such as
tree-shaking) is unused. We can revisit later if we need a bundler for
the rest of devtools, but since we are in active migration to ESM that
is infeasible at this point in time.

As part of this CL, the following folders are migrated to ESM:
- cm_headless/
- formatter_worker/
- heap_snapshot_model/
- heap_snapshot_worker/
- text_utils/

Since text_utils is also an autostart module for the shell, this is the
only module that is imported from root.js.

Some of these modules also include files that are annotated with
skip_compilation and thus run with dummy files during Closure
compilation.

Note that, because of the usages of import-statements in the workers
and the blocking bug [1], the workers are generated even when Chromium
is built with `debug_devtools=true`.

Since heap_snapshot_model/ also used in the profiler, we have to eagerly
load this module in root.js. Once all other dependencies of the profiler
have been migrated to ESM, we can remove this import-statement.

[1]: crbug.com/680046

Bug:1013129,1006759
Change-Id: I4c03c7b8a1f351ae9693cbcd922412083dd34bba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1883707
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-07 11:55:25 +00:00
Yang Guo b7a4426053 Fix npm run test
R=tvanderlippe@chromium.org

Change-Id: I7b970a8281831aa5f517a7bf64187a6a7757f5dc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1899514
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-11-06 14:51:45 +00:00
Tim van der Lippe b45d9a0a31 Remove ProductRegistry
Design doc: https://docs.google.com/document/d/1fRNhE_FXfCWwR8zOBkE5J5B6An53Lf0GbQHUB1QSnEI/edit?usp=sharing

Bug:664704,1011466
Change-Id: Iaec3f495a18b821b312694011129902a9c63f67f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893080
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-11-05 17:54:26 +00:00
Yang Guo 879d97b05d Move hosted mode scripts
Also set useful default for Chromium path for Linux.

Change-Id: Idcf5a229f254a8081338630bf9279678fb03e111
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893089
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-11-05 13:36:56 +00:00
Tim van der Lippe 647e33b2a1 Reland "Implement lazy loading of modules"
This reverts commit cc75dee3ba.

Reason for revert: Race-condition fixed in devtools-compatibility.js

Original change's description:
> Revert "Implement lazy loading of modules"
> 
> This reverts commit 7c08ccfd54.
> 
> Reason for revert:
> 
> Breaks browser_tests. Steps to reproduce:
> - Build Chromium's browser_tests target
> - Run `xvfb-run -s "-screen 0 1024x768x24" out/Default/browser_tests --gtest_filter=DevToolsExtensionTest.TestDevToolsExtensionAPI`
> - Observe this failure: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8897915672067501312/+/steps/browser_tests__with_patch_/0/logs/Deterministic_failure:_DevToolsExtensionTest.TestDevToolsExtensionAPI__status_FAILURE_/0
> 
> Original change's description:
> > Implement lazy loading of modules
> > 
> > Any module that is not autostart and has `modules` specified in its `module.json`
> > will now have its entrypoint dynamically imported. Update the release build script
> > to output the `modules` array as well so that the Runtime can load it.
> > 
> > Add additional entrypoints to `platform` and `dom_extension` to be consistent
> > with the naming patterns of all other modules
> > 
> > Bug:1006759
> > Change-Id: If6d10a13a62354079e3f8ee49bee4ecdcffa6758
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893085
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> 
> TBR=yangguo@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org
> 
> Change-Id: I22e8a341e841a99df0df9808a419cc070dd81bea
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1006759
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893087
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>

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

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

Bug: 1006759
Change-Id: Id69542e883fc4b852a79e83373773de256976f83
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1897686
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-04 19:25:35 +00:00
Mandy Chen 167e7ad444 Normalize line ending to LF in localizatioin scripts
TL;DR: When retrieving the file content with localization scripts,
normalize the line ending to LF.

Issue:
When a grdp file containing multi-line strings has CRLF line ending,
the parser doesn't work because the IDS hash is calculated based on the
content of the <message> tag, which expects LF line ending. The multi-
line string ends up having a different expected hash, and the parser
complains about it.

Repro:
Change line ending of front_end/coverage/coverage_strings.grdp to CRLF.

Fix:
Normalize line ending to LF when retrieving the file content.

Change-Id: If3a33978724a4bf9635738c67ada211e5e996e30
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1895994
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
2019-11-04 18:04:05 +00:00
Yang Guo 9117835a2a Move deps related scripts to scripts/deps
Change-Id: I283d589c92a813daa484f5c7fe83ee16e285f275
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1891416
Auto-Submit: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-04 11:53:25 +00:00
Yang Guo cc75dee3ba Revert "Implement lazy loading of modules"
This reverts commit 7c08ccfd54.

Reason for revert:

Breaks browser_tests. Steps to reproduce:
- Build Chromium's browser_tests target
- Run `xvfb-run -s "-screen 0 1024x768x24" out/Default/browser_tests --gtest_filter=DevToolsExtensionTest.TestDevToolsExtensionAPI`
- Observe this failure: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8897915672067501312/+/steps/browser_tests__with_patch_/0/logs/Deterministic_failure:_DevToolsExtensionTest.TestDevToolsExtensionAPI__status_FAILURE_/0

Original change's description:
> Implement lazy loading of modules
> 
> Any module that is not autostart and has `modules` specified in its `module.json`
> will now have its entrypoint dynamically imported. Update the release build script
> to output the `modules` array as well so that the Runtime can load it.
> 
> Add additional entrypoints to `platform` and `dom_extension` to be consistent
> with the naming patterns of all other modules
> 
> Bug:1006759
> Change-Id: If6d10a13a62354079e3f8ee49bee4ecdcffa6758
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893085
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

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

Change-Id: I22e8a341e841a99df0df9808a419cc070dd81bea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1006759
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893087
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-11-02 10:05:43 +00:00
Tim van der Lippe 7c08ccfd54 Implement lazy loading of modules
Any module that is not autostart and has `modules` specified in its `module.json`
will now have its entrypoint dynamically imported. Update the release build script
to output the `modules` array as well so that the Runtime can load it.

Add additional entrypoints to `platform` and `dom_extension` to be consistent
with the naming patterns of all other modules

Bug:1006759
Change-Id: If6d10a13a62354079e3f8ee49bee4ecdcffa6758
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1893085
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-01 16:38:43 +00:00
Mandy Chen 01845077f9 Fix regex in localization parser to recognize CRLF line ending
Update localization script to recognize CRLF line ending.

Change-Id: I80f2789023f281b9630a6943b95c09266789ef9c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1894551
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
2019-10-31 23:13:42 +00:00
Lorne Mitchell 0a1c649850 DevTools: Updated the generate_devtools_ui_strings.js/.py scripts to reference the new repo location.
Bug: 941561
Change-Id: I80d8f3a2a6fe3662985c257786e9a7cecfa5a53b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1888518
Reviewed-by: Mike Jackson <mjackson@microsoft.com>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
2019-10-30 15:15:34 +00:00
Ingvar Stepanyan 1a8762b0f1 Add native DWARF support
This adds native location resolver, written in Rust and compiled to
WebAssembly, that can parse DWARF information from other given
WebAssembly modules and resolve addresses <-> source location mappings
in both directions.

From V8 side, this depends on recently added Debugger.getWasmBytecode
command and on a special "wasm://dwarf" source map URL reported for Wasm
modules that contain DWARF information.

On the JavaScript side, this uses autogenerated JavaScript bindings by
wasm-bindgen to an internal context which contains all parsed data and
lazily creates SDK.SourceMapEntry when requested. These bindings are
further wrapped into a public class that implements SDK.SourceMap
interface.

---

Always auto-step over Wasm DWARF

Wasm doesn't have any other source when DWARF is used for source
mapping, so it will step into an empty source pane.

This is not very useful, so let's always auto-step to the next resolved
location.

There are talks about stabilising auto-stepping for JS source maps as
well, but for now limiting to just the new functionality should be
safer.

Change-Id: I6e981dcd33a03a5db2f2b1e39a93372c5ba09b97
Bug: 1016772
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872581
Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2019-10-30 00:51:22 +00:00
Yang Guo b89b085f36 Add __name__ == "__main__" guards to test scripts
R=tvanderlippe@chromium.org

Change-Id: I80d623cd1eb7c87386e8619e4dd7c568f79c5a67
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1884555
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Mike Jackson <mjackson@microsoft.com>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-28 21:54:07 +00:00
Ingvar Stepanyan 70f122128c Fix build on Windows
Without this check, Python ends up spawning lots of Java processes and filling console with errors instead of building.

See https://stackoverflow.com/a/18205006.

Change-Id: Ia9956f649a59ec372dce675adcce31f072d8ee7f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1883723
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
2019-10-28 16:36:56 +00:00
Tim van der Lippe 37fe72f23b Fix npm run test script
Change-Id: Id8917176d1d9f4c0f7245504beefba2d15988a0f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1883710
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-10-28 14:31:46 +00:00
Yang Guo 75beda900f Move test scripts to scripts/test
R=aerotwist@chromium.org, liviurau@chromium.org, machenbach@chromium.org

Bug: 1018122
Change-Id: I7cc3a1a9ab01c649b3c7fe8ba5d5254adc631634
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880033
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
2019-10-28 07:57:59 +00:00
Paul Lewis 75090cfd93 Reland "Updates node_modules and update script"
This is a reland of 4df552c652

Original change's description:
> Updates node_modules and update script
> 
> Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>

Change-Id: I97d1442c21420488fadde3f17f67cd4e3b959be6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880030
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-10-25 13:19:06 +00:00
Lorne Mitchell db3885dd80 Revert "Updates node_modules and update script"
This reverts commit 4df552c652.

Reason for revert: Breaks esprima.

Original change's description:
> Updates node_modules and update script
> 
> Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>

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

Change-Id: Iad2bcdf98a486476715d1e829cdce450c5f218af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880098
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
2019-10-24 21:53:24 +00:00
Paul Lewis 4df552c652 Updates node_modules and update script
Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-10-24 14:48:04 +00:00
Yang Guo fa871b62c0 Introduce script to roll into Chromium
R=machenbach@chromium.org

Change-Id: I12095ad6c5232314537d63edf5fffecc2e9fcb06
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1876814
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
2019-10-24 14:07:48 +00:00
Michael Achenbach 1473de827c Whitespace change to test bots
This also makes the whitespace file a data deps to force running
swarming tests on whitespace changes.

Change-Id: Ib71180609efca36ff78bc4339c6cccf1e90c673e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872589
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
2019-10-22 12:20:54 +00:00
Mathias Bynens 032591d692 Fix formatting
Running `npm run format-py` on a fresh checkout results in some
changes. This patch commits those changes so that they do not
become part of unrelated CLs.

Change-Id: Ie8051c7907ac9624e9fe870e2137b9a9fe2769c3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871869
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2019-10-21 13:02:51 +00:00
Michael Achenbach e18baf2ce8 Whitespace change to test bots
Change-Id: I2a7101deed226ab672d582253d19f5715e75e3af
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871556
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
2019-10-21 11:10:23 +00:00
Yang Guo 015c235224 Add whitespaces.txt
TBR=machenbach@chromium.org

Change-Id: Icc4e94c16f099c2883418c63d46a79497b907fa8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1869655
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-21 08:29:11 +00:00
Yang Guo 4fd355cc40 Switch to new repository 2019-10-21 08:08:56 +02:00
Christy Chen d638d21ae7 DevTools: Update localization error message to warn about placeholder <ex>
The presubmit script did not warn about the missing example tag for placeholders.
This Cl added more details to the error message.
https://imgur.com/a/9I7hXfx

Bug: 941561
Change-Id: I2a950e4dd1fecc0a4dfea7467216c71c964c97b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845580
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#707569}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 21c1a43916ce6b405246e60c5c21613f372fdb68
2019-10-18 22:45:52 +00:00
Yang Guo d584b90e85 Move unit tests to test/unittests
Change-Id: I4dd89cae3441f1da5ae4b2a393a3ff66a67f6451
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1859787
Auto-Submit: Yang Guo <yangguo@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#705524}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 94a941ed8494e3751c04db857a8f0513b98258a5
2019-10-14 12:17:30 +00:00
Tim van der Lippe a4d448c312 Migrate console_counters/ to ESM
- Also upgrade the refactor script to automatically add the
extensionpoint to the BUILD.gn to save myself some typing.

Bug: 1006759
Change-Id: I3f789f96122569141194ce26ac288f01af68f6e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1852209
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#704600}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e55e98bc0ca76229380e3bca5a78e15d953da0c5
2019-10-10 13:38:29 +00:00