Commit Graph
8 Commits
Author SHA1 Message Date
Simon Zünd 36c54939b9 [web tests] Move expected files to the new location
Expectation files moved upstream in Chromium so we also have to
mirror the new structure in DevTools.

R=alexrudenko@chromium.org

Bug: None
Change-Id: I934d40bf371c3155ff013d3fc3be59ff734ce51e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3643856
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2022-05-12 10:41:03 +00:00
Tim van der Lippe a1f5ccbd86 Remove legacy files from module.json 3/n
R=aerotwist@chromium.org

No-Presubmit: true
Bug: 1131500
Change-Id: I0ecc62bd0c80808fcd9db510ae38fd24f8750df0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2767346
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-19 16:31:49 +00:00
Tim van der Lippe 6ba009e8ab Fix side-effect instance constructions during module loading
While working on the linear memory inspector component
(https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2501301)
we discovered that both snippets and quick_open were side-effect
instantiating instances during module loading. This caused issues
when trying to write isolated unittests for other components, if
they were (transitively) importing these modules.

To resolve these issues, we defer creation to the appropriate time.
In the case of CommandMenu, this was a small refactoring to use
the instance-singleton-pattern we have been using throughout the
codebase.

For Snippets, it was less obvious. In the end, we realized that
the singleton instances that snippets/ was relying on were constructed
in `Main.MainImpl.MainImpl._createAppUI`. More specifically,
the instantiation of `self.Persistence.isolatedFileSystemManager`
right at the top of `_createAppUI` was implicitly required for
snippets/.

This wasn't a problem when loading DevTools, as we lazy-load snippets/
after we instantiate `MainImpl`. Hence, the singletons were in place
and the code would correctly function. However, that assumption is
invalid when loading `snippets/` in isolation, which was the case
when writing the unit test.

The same treatment was necessary for `Snippets.project`, which has
been moved to a lazily-computed function.

R=aerotwist@chromium.org,jacktfranklin@chromium.org,kimanh@chromium.org

Fixed: 1143170
Change-Id: I28d3bbbc428f0316ca89453f98331b7479711c87
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2503953
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2020-11-02 11:47:22 +00:00
Tim van der Lippe c2cb4301c9 Add missing license headers
In a follow-up CL we will be porting the license header check to ESLint.
This allows us to add missing license headers for TypeScript-authored
files. The script found some missing license headers already, which this
CL adds.

Change-Id: Id5041813281d2a7151297f9ed29baabc1cfd85af
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2097991
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-12 14:53:52 +00:00
Tim van der Lippe d8c23debbe Fix clang-format configuration
The configuration was only including files that were in a commit diff.
This causes issues where we generate sources during the PRESUBMIT (which
are not in the git diff at that point in time) and don't format.

At the same time, we remove the complicated logic to reuse the
`.eslintignore` for clang-format purposes and use the correct
`.clang-format` "DisableFormat" options to disable formatting in various
directories.

Roll CodeMirror: ignore

Change-Id: I21b95a6e09c5d6bf036bf1aace103d6c26823ecc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2091445
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-06 12:06:33 +00:00
Tim van der Lippe f880a70cb7 Reland "Migrate test_runner/ to ESM"
This is a reland of 5d36acc6cb

Problematic timeout logic has been removed for now, pending resolution
of crbug.com/1032477

Original change's description:
> Migrate test_runner/ to ESM
>
> The TestRunner logic breaks when trying to load as an ES module. This
> was the root cause for the failures we saw when we were migrating main/
> to ESM.
>
> Since TestRunner directly relies on main/ existence, we first have to
> migrate the test_runner to ESM. However, this uncovered a lot of
> problems. Most importantly, symbols were sometimes overwritten and
> ordering was important.
>
> The bootstrap methods of TestRunner are now moved to the top. This
> includes setting up the error-catching logic and adding results.
>
> All other symbols are exported but also put on the global scope, as that
> is what the layout tests still require.
>
> A pre-existing bug is the fact that tests time out if there is any
> (syntax) issue in TestRunner itself. We will need to fix that issue, as
> it makes debugging TestRunner itself very difficult. However, I will
> punt that to a follow-up CL, as this CL is already quite difficult to
> reason about.
>
> Bug: 1006759, 1019182
> Change-Id: Id64422968171888dbdbcc927dfd174d7868f333e
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953583
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

Bug: 1006759, 1019182, 1032477
Change-Id: I26bbda9a39f28291d88fb56a2d5b68899314f212
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1958992
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-12-10 14:25:56 +00:00
Simon Zünd 910988b619 Evaluating snippets should use V8's REPL mode
This CL sets the 'replMode' flag of the 'Runtime.evaluate' CDP command
to true when evaluating snippets. The flag is currently ignored by V8.

R=petermarshall@chromium.org

Bug: chromium:1004193
Change-Id: Ia4101310593ee13d874d96aaa67c3c2c4e37a8c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1876808
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
2019-10-24 09:50:58 +00:00
Yang Guo 4fd355cc40 Switch to new repository 2019-10-21 08:08:56 +02:00