The part that takes a lot of time in running unit tests is actually
spinning up the browser and connecting to it.
`watch-unittests` command starts the file watcher for Karma
test runner which runs the tests on file change.
You can use this without `watch` script and by just rebuilding
the target.
When combined with `watch` command, this enables you to run unit tests
instantly after a file change.
Bug: none
Change-Id: Icd71230b5b455254dc25b4cef5f6ae72c5dbba06
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5012787
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
This is the first in a long set of CLs that will begin to remove old
engine functionality we do not need.
I have started with the ThreadTracksSource enum and removed the
BOTH_ENGINES flag; updating all the screenshot tests to use the new
engine exclusively. In future CLs I will remove the enum and the flag
entirely, but first I will go through and remove code that only runs for
the OLD_ENGINE flag.
Bug: 1499182
Change-Id: I7ab164e500576d044f334705d5e99649b3523e94
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5002389
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
This CL updates `generate_css_files` script and `watch` script to enable us to get CSS file changes instantly applied for non-legacy CSS files.
Drive by:
* Added an initial build step before starting to watch changes(1)
* Improved logs to include the time of the change.
* Updated `watch` listener to only get activated on `change` events.
(1) was something I was always missing starting this script.
You can try the behavior by:
* Running `npm run watch` and starting the watch mode.
* Opening the DevTools.
* Updating a non-legacy CSS file and expect to see the CSS change instantly on the opened DevTools.
Bug: none for now
Change-Id: I2aa3ed1b36584d1ef011119d5092d12271fb3017
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4922476
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Thanks to Ic386d62addec124e9c4c01c3a0bb4469e9193de9, we can roll to
working tree of chromium code base.
But without "default=ReferenceMode.Tot", the default value is None,
and thus the script does not update the origin/main.
So this CL sets Tot as the default value.
Bug: N/A
Change-Id: I6355ccc54bb929297d46251eda6ecf1c5fa7fd0f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4933565
Commit-Queue: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Ken Okada <kenoss@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
This CL changes the Puppeteer instance used by the e2e and interaction tests to work in the Tab target mode, that is the mode that supports MPArch and features like pre-rendering. In the next releases of Puppeteer it will be enabled by default and this configuration can be removed.
Bug: chromium:1484476
Change-Id: I771234935a1d95de143a6c4559aa297d7dd1b4ae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4853353
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Something I often want to do is search through our fixtures to find a
fixture that contains a certain event. However, because our files are
gzip'd, I have to manually extract them before doing anything.
So to avoid that, I wrote up this little script that will help:
```
$ node scripts/search-trace-files.js "v8.parse"
Searching for v8.parse
=> basic-stack 2.json
=> basic-stack.json
=> busy-network.json
=> cls-cluster-max-timeout.json
=> idle-callback.json
=> interactive-time.json
=> invalid-animation-events.json
=> large-recalc-style.json
=> load-simple.json
=> many-requests.json
=> multiple-navigations.json
=> multiple-top-level-renderers.json
=> react-hello-world.json
=> redirects-subresource-multiple.json
=> sync-like-timings.json
=> timings-track.json
=> two-workers.json
=> user-timings-complex.json
=> user-timings.json
=> web-dev.json
```
Bug: none
Change-Id: I66f7d3de88d5dd7a840331198c9215ccf5b7f357
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4855767
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
The code generator embeds the last n entries of its own filename into
the generated InspectorBackendCommands. It used to be n=4, which
happens to create a different filename depending on whether the
script is run from a chromium or a standalone devtools-frontend
checkout. So set n=3.
DISABLE_THIRD_PARTY_CHECK=Updating code genrator
Bug: none
Change-Id: I09fad6d43377c8558709cbe41dba106f9c813caf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4852085
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Production builds did not include some Puppeteer files necessary for use in DevTools as a result of `puppeteer-tsconfig.json` not being up-to-date.
This CL also fixes the third_party roll script to ensure third party `tsconfig` files are updated upon roll.
Fixed: 1470202
Change-Id: Icf3f64db2888e601ee15e32d2571750fbd50a06b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4753137
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Auto-Submit: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
We need to ensure that each test that uses the trace engine is defined
using the function() keyword rather than an arrow function so that the
timeout is correctly set. This CL adds a rule to enforce and autofix
that.
Note that this CL does not enable the rule, I will do that in a
follow-up.
Bug: none
Change-Id: I33c1d2ea4bf8e639fd6b58dcabab8655b1ff222c
No-Presubmit: True
No-Tree-Checks: True
No-Try: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4724881
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Passing an array to `path.join` is not supported, it takes unlimited
arguments rather than an array of one.
This was introduced in crrev.com/c/4678757, but I think the bots were
happy because they do not use the index page and instead navigate
directly to examples. This error only triggered on the index page.
As a drive-by, I also bumped the font size as otherwise they use the
default, rather small, DevTools font size.
Bug: none
Change-Id: I580c454d62e3ce66065bdb21c2fc7b0349825637
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4685569
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
This CL updates the run_test_suite.js script to support the --autoninja
flag alongside --target, in which case it will do a build before running
the tests.
Unfortunately I had to duplicate the package.json entry, else we get
into a world of confusion with passing command flags through npm run
commands, and I couldn't get it to work.
Bug: none
Change-Id: I0a339c72cf41a4ffcb0241e8b3efb1b35b2e5a9f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4684353
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>