25 Commits
Author SHA1 Message Date
Benedikt Meurer 6b5dba97f0 [npm] Add initial npm start script.
This adds an initial version of the `npm start` script, which builds the
DevTools front-end and launches either CfT or Chrome Canary binary with
the custom DevTools front-end, passing appropriate flags to enable or
disable certain experimental features.

Bug: 404192426
Change-Id: Ia7bcbf8cb5f93bcf455e59964a488480e8ec1fff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6367034
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2025-03-18 03:34:36 -07:00
Simon Zünd abf0cd1847 [deps] Update rollup to 4.24.3 (and update plugins)
Since we have the major version jump, we needed to update quite
a few things to make this work:

  1. rollup4 ships with native binaries. We can't check them into
     our node_modules for all platforms. Luckily they also ship a
     a wasm version. This requires us to adjust the 'binary' path
     to `node_modules/@rollup/wasm-node/dist/bin/rollup` instead.

  2. rollup4 is more strict when it comes to ES modules vs
     CommonJS. We adjust this by renaming the rollup config files.

  3. Some plugins got deprecated so we had to replace them with
     the newer versions (source maps and terser).

Bug: None
Change-Id: If13d590c8185db6ad85b3992d0a869111909dc8c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5999255
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2024-11-07 05:25:54 +00:00
Mathias Bynens a017ced955 Use Chrome for Testing instead of Chromium binaries
To reduce complexity, the folder names within the CfT archives are
simplified as follows:

- chrome-win64 → chrome-win
- chrome-mac-{arm64,x64} → chrome-mac
- chrome-linux64 → chrome-linux

Bug: chromium:1465312
Change-Id: I984e818d58ef6dd16b44db022eefcb55b5afce50
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4724028
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2023-07-27 12:13:35 +00:00
Mathias Bynens 5c9b5f1ea9 Add chrome to DEPS alongside chromium_*
This patch prepares the relevant entries and scripts to version-pin and
download Chrome for Testing alongside Chromium. Consuming these new
binaries instead of Chromium is planned for a separate CL.

Bug: chromium:1465312
Change-Id: Ic1fca66b7a213e10c7200fc6f5f2ba6aeaa225cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4685561
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2023-07-18 15:16:39 +00:00
Takuto Ikuta 95a359d10c typescript: introduce devtools_skip_typecheck build flag
This is experimental flag introducing esbuild for typescript transpiler.

I needed to modify some test code to pass tests with esbuild.

Bug: chromium:1278663
DISABLE_THIRD_PARTY_CHECK=need to add esbuild DEPS too
Change-Id: I661951fc4fd8f5e6a2a599e531638ab294f887f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3330076
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
2022-01-24 02:19:51 +00:00
Alex Rudenko 413451a8b1 Fix root path detection
Bug: none
Change-Id: I5834aa987d8f46f2c7042c79f501e0eb9503ed96
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3045708
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-07-22 16:16:03 +00:00
Christy Chen 5e32bcbcf7 [Loc] Un-hook presubmit scripts
The Localization presubmit steps include checking Loc V1 and V2:
V1: Done with migration, safe to remove
V2:
- check unused string in UIStrings (Moved to ESLint)
- check migrated directory (Done with migration, safe to remove)
- check the shape of API calls (Done by typescript or ESLint)

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


Bug: 1136655
Change-Id: If203607588896693a6331de606c873458b74cd6e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2746919
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-03-11 03:32:57 +00:00
Christy Chen 23909d8cfc [Loc] Presubmit performance improvement
The current Loc presubmit are doing two checks: check_localizable_resources and check_localizability
(Details of what they are checking: https://docs.google.com/document/d/1L6TkT2-42MMQ72ZSBMFwUaq7M6mDgA2X0x8oHHKaV_U/edit#heading=h.w1no7qaa0mi0)

This CL merge two checks into one single check. check_localizability are modified into a utils file, and check_localizable_resources will also run those localizability checks when the files are visited. By doing this, we avoid the extra call to node during presubmit, and all files and nodes will only be visited once.

Also adding these fixes
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2370103
Fix:
- Pass the fullpath for comparison.(itemPath)
- Normalize comparison between paths
- using native fs.promises instead of promisify (https://github.com/nodejs/node/pull/26581)

Bug: 1116989
Change-Id: I054040d83a65b5f798a21c040096422e287bc799
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2381320
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2020-09-04 05:07:07 +00:00
Tim van der Lippe 6a935445b3 Port perf test suite to mocha runner
This resurrects the perf test suite, as the older test-runner setup
was removed, but the perf test suite was not ported.

Example output:

Spawning hosted mode server
  Boot performance
    ✓ run 1/37 (1185ms)
    ✓ run 2/37 (1234ms)
    ✓ run 3/37 (1213ms)
    ✓ run 4/37 (1376ms)
    ✓ run 5/37 (1327ms)
    ✓ run 6/37 (1235ms)
    ✓ run 7/37 (1352ms)
    ✓ run 8/37 (1439ms)
    ✓ run 9/37 (1332ms)
    ✓ run 10/37 (1290ms)
    ✓ run 11/37 (1229ms)
    ✓ run 12/37 (1241ms)
    ✓ run 13/37 (1233ms)
    ✓ run 14/37 (1203ms)
    ✓ run 15/37 (1177ms)
    ✓ run 16/37 (1336ms)
    ✓ run 17/37 (1526ms)
    ✓ run 18/37 (1465ms)
    ✓ run 19/37 (1537ms)
    ✓ run 20/37 (1709ms)
    ✓ run 21/37 (1760ms)
    ✓ run 22/37 (1704ms)
    ✓ run 23/37 (2549ms)
    ✓ run 24/37 (1387ms)
    ✓ run 25/37 (1934ms)
    ✓ run 26/37 (1860ms)
    ✓ run 27/37 (1309ms)
    ✓ run 28/37 (1295ms)
    ✓ run 29/37 (1391ms)
    ✓ run 30/37 (1569ms)
    ✓ run 31/37 (1562ms)
    ✓ run 32/37 (1442ms)
    ✓ run 33/37 (1431ms)
    ✓ run 34/37 (1646ms)
    ✓ run 35/37 (1927ms)
    ✓ run 36/37 (1600ms)
    ✓ run 37/37 (1587ms)
Mean boot time: 1475.28ms
50th percentile boot time: 1390.83ms
90th percentile boot time: 1860.02ms
99th percentile boot time: 2549.29ms

R=aerotwist@chromium.org

Change-Id: I1b6a79fdfc1b7c98f6156d3309b5b98ff8530476
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209108
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-05-20 13:42:43 +00:00
Tim van der Lippe 869374bcab Port shared test runner logic into separate package
The shared test runner logic was reimplementing parts of Mocha,
in particular the test logging and filtering. Moreover, it was
booting the hosted mode server and puppeteer outside of Mocha.

Mocha supports root level hooks [1]. These hooks allow us to
perform work before a test starts. Moreover, by using the
before and after hook, we can run logic before and after
all tests.

By using these hooks, we can extract the "boot the hosted mode
server and hookup puppeteer" part to these root hooks.
Additionally, we can reset the pages in the `beforeEach`, which
means that tests themselves don't have to reset the pages.

We also put the implementation code into third_party/conductor,
as we would like to reuse this logic for the Puppeteer tests.
The Puppeteer test suite now also uses Mocha and has very
similar requirements as to our DevTools tests. By extracting
from DevTools, we can look into expanding the test runner to
other usecases, but that is out of scope for now.

[1]: https://mochajs.org/#root-level-hooks

Bug: 1071369

Change-Id: Ie9f954359d9de84da564b74b6f5517dd535db008
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2150458
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-04-20 10:32:58 +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
Yang Guo 6e99c7c542 Move test and localization scripts
R=tvanderlippe@chromium.org

Change-Id: I9bfa77ef2791638b07089e4faf405f834ff47148
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947525
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-12-03 16:48:56 +00:00
Paul Lewis 449ac187cb Adds manual boot perf script
This script loads the DevTools frontend in hosted mode and waits for the
elements panel to appear. After this it calculates the mean and median
boot times and logs them out.

Bug: 1027519
Change-Id: I01094a95d5178bbf60f964a5c26e92efa604b1e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942287
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-03 10:32:56 +00:00
Paul Lewis e184c4c207 Adds license checker
This CL adds license-checker to manage_node_deps.

Change-Id: Ia525e9c2380fc2654e9903ecc7fd4e94cdce1f9a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1944866
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-02 12:39:54 +00:00
Paul Lewis 66e1206c8b Updates manage_node_deps to install missing deps; adds yargs
The `npm ci` call in the script will fail due to any mismatch between
the DEPS declared and those listed in the package-lock.json file.

This CL updates the script to install any missing deps by comparing the
list in package-lock.json with the DEPS, and adding any that are
missing.

Yargs is needed for the boot perf benchmark, so adding its DEP here
and will update the node_modules directly in a future CL.

Bug: 1027519
Change-Id: Ifbc69b242d0cfc4d79d23f756f267a5a2f45039f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1944861
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-02 12:09:24 +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
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 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
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
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
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 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
Yang Guo 4fd355cc40 Switch to new repository 2019-10-21 08:08:56 +02:00
Yang Guo d81769871b DevTools: introduce devtools_paths.py to manage paths
The new devtools_paths.py detects whether the frontend code
is hosted in the Chromium repository, in an external repository during
standalone build, or in an external repository during integrated build.

R=aerotwist@chromium.org

Change-Id: I800ab63f985d203359e387f9c81df9270929b437
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1839791
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#703014}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dd36b0f6b3fdbaa069facb239773596ae816febb
2019-10-04 20:30:35 +00:00