Commit Graph
70 Commits
Author SHA1 Message Date
Tim van der Lippe 2a4ae2bdc3 Run ESLint only on affected files for regular uploads
For most of the PRESUBMIT invocations, the CL in question does not
change anything with regards to ESLint. Therefore, we can skip doing the
full check and only perform the check on relevant JavaScript and
TypeScript files.

However, if we do change the ESLint configuration (via one of the
involved build scripts/configuration files), we should run the full
check to make sure we are compliant.

`npm run check-lint` will still run the full lint check.

This saves about 15 seconds on a regular PRESUBMIT invocation, scaling
with the number of files changed.

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

Change-Id: I9c1bb055274bfa1d8cc47c9039a1196c92eba399
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2097993
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-12 16:18:05 +00:00
Tim van der Lippe 4a8441c385 Port license header check to ESLint
This improves the PRESUBMIT performance as we can rely on the AST
parsing of ESLint, meaning we don't have to parse AST twice.

It also allows us to use the nice `--fix` solution to insert the proper
license header in the files.

This shaves an expected 5 seconds of the presubmit time
(non-scientifically computed based on 2 uploads).

Change-Id: I5c53e9b232585f9ec46f86b36557c50bf80f7add
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2097992
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-12 16:08:22 +00:00
Tim van der Lippe ba26b2b503 Run ESLint on the scripts directory
We weren't running ESLint on this directory and, as it turns out, there
are quite a few linter errors in this folder.

R=jacktfranklin@chromium.org

Change-Id: Ic6cb9f6ad4858f69114e0c433a954041215b49e2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2096705
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-11 14:47:51 +00:00
Tim van der Lippe 333ffc2274 Cleanup linter check
- Remove duplicate handling of subprocesses
- Remove indirection of js_lint (we can simply name it main)

These cleanups allow us to later optimize the linting step by only
linting changed files.

R=aerotwist@chromium.org

Change-Id: Ifb8fdb3a25ea04a4879d434d85ff44aa17dae012
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2088091
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-03-09 10:57:07 +00:00
Tim van der Lippe b3b90761b1 Generate InspectorBackendCommands.js on presubmit
This checks in the InspectorBackendCommands in the source tree file
and ensures that it is kept in sync whenever the third_party
location has been updated.

In the process, I discovered multiple misconfigurations in the formatting
presubmit check. First of all, it was never running, because the
.eslintignore had an empty line. Second of all, it was running twice,
which is unnecessary since we now check for changed files at the end
of the presubmit. Lastly, it was only formatting JS files, while it
should check all files.

I have also updated the _CheckGeneratedFiles check to only run if it
is actually necessary. If there are no changes made to any affected of
the files, it will skip the step. This should thus reduce the presubmit
time and we will only pay the cost if we actually update any of the
files.

Lastly, it will now properly format and lint the generated files. This
makes reading the code a lot easier and makes it easier to digest the
diff when a protocol update goes through. I have verified that, in a
full build, the files are still minified. Thus, this has no impact on
the loading performance.

DISABLE_THIRD_PARTY_CHECK=Updating protocol generation

Fixed: 1056614
Change-Id: If49b0e749978ea1a7838992ec13507ee761ad76c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2087765
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-04 15:52:35 +00:00
Tim van der Lippe f664763cdf Generate SupportedCSSProperties.js on presubmit
This checks in the SupportedCSSProperties in the source tree file
and ensures that it is kept in sync whenever the third_party
location has been updated.

Bug: 1056614
Change-Id: If0ff2ba0f94f1f0eded2792922e9a917820d9772
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2087762
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-03-04 14:23:14 +00:00
Tim van der Lippe 4d004ec2b8 Generate ARIAProperties.js on presubmit
This checks in the ARIAProperties in the source tree file and ensures
that it is kept in sync whenever the third_party location has been
updated.

Bug: 1056614
Change-Id: Ic48b6cba17fe0a3c6b7d28dd3f74483ceac2969b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2085176
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-04 12:07:04 +00:00
Connor Clark 933525c2bd Audits: Roll Lighthouse to front_end/third_party
Cherry-picked https://github.com/GoogleChrome/lighthouse/pull/10036 to the 5.7.1 branch.

Bug: 772558

Change-Id: Ia363faf4789d776ddb190126df5d3cb525bd434a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1933901
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: John Emau <John.Emau@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-28 20:18:38 +00:00
Paul Lewis 65761161be [perf] Updates boot perf test
Change-Id: I7d8f9cf62638230a1d912c7c12beca02a2883bfa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2077658
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-02-28 10:40:09 +00:00
Tim van der Lippe 1a0338a117 Reland "Build Karma test with Ninja"
This reverts commit 01ac2b90b3.

Reason for revert: Build fixed in Chromium

Original change's description:
> Revert "Build Karma test with Ninja"
>
> This reverts commit 4b654444ed.
>
> Reason for revert: Broke the build in Chromium: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8887844056671365856/+/steps/compile__with_patch_/0/stdout
>
> Original change's description:
> > Build Karma test with Ninja
> >
> > This instructs Ninja to generate the appropriate files for the test
> > files. It adds a separate `ts_library` definition for tests.
> >
> > Some caveats:
> > - It currently hardcodes the Ninja build output name. We should fix out
> > a solution on how to make this irrespective of build name
> > - The test name has to be renamed to Color_test.ts. While I think this
> > is clearer for code navigation, it was necessary because `ts_library`
> > currently copies to `resources/inspector`, which is not necessary for
> > test files. We could therefore filter these out, based on the files that
> > end with `_test.ts`. We could also add a separate Ninja template,
> > something like `ts_test_library`. Not sure yet what is the best
> > approach.
> >
> > DISABLE_THIRD_PARTY_CHECK=Updating TypeScript configuration
> >
> > Bug: 1011811
> > Change-Id: If7448474e84a013d8d4b00a16743575a12112f58
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2064669
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
>
> TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: I1048a5003b5680b257586cf3720fc5eaddb435d5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1011811
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2067061
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Reland

Bug: 1011811
Change-Id: I9df8d551a18c7733fca586f504621c18262e941d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2067062
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-21 15:05:54 +00:00
Tim van der Lippe 01ac2b90b3 Revert "Build Karma test with Ninja"
This reverts commit 4b654444ed.

Reason for revert: Broke the build in Chromium: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8887844056671365856/+/steps/compile__with_patch_/0/stdout

Original change's description:
> Build Karma test with Ninja
> 
> This instructs Ninja to generate the appropriate files for the test
> files. It adds a separate `ts_library` definition for tests.
> 
> Some caveats:
> - It currently hardcodes the Ninja build output name. We should fix out
> a solution on how to make this irrespective of build name
> - The test name has to be renamed to Color_test.ts. While I think this
> is clearer for code navigation, it was necessary because `ts_library`
> currently copies to `resources/inspector`, which is not necessary for
> test files. We could therefore filter these out, based on the files that
> end with `_test.ts`. We could also add a separate Ninja template,
> something like `ts_test_library`. Not sure yet what is the best
> approach.
> 
> DISABLE_THIRD_PARTY_CHECK=Updating TypeScript configuration
> 
> Bug: 1011811
> Change-Id: If7448474e84a013d8d4b00a16743575a12112f58
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2064669
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

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

Change-Id: I1048a5003b5680b257586cf3720fc5eaddb435d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2067061
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-21 12:41:24 +00:00
Tim van der Lippe 4b654444ed Build Karma test with Ninja
This instructs Ninja to generate the appropriate files for the test
files. It adds a separate `ts_library` definition for tests.

Some caveats:
- It currently hardcodes the Ninja build output name. We should fix out
a solution on how to make this irrespective of build name
- The test name has to be renamed to Color_test.ts. While I think this
is clearer for code navigation, it was necessary because `ts_library`
currently copies to `resources/inspector`, which is not necessary for
test files. We could therefore filter these out, based on the files that
end with `_test.ts`. We could also add a separate Ninja template,
something like `ts_test_library`. Not sure yet what is the best
approach.

DISABLE_THIRD_PARTY_CHECK=Updating TypeScript configuration

Bug: 1011811
Change-Id: If7448474e84a013d8d4b00a16743575a12112f58
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2064669
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-21 11:49:54 +00:00
Tim van der Lippe 69ac3898ce Reland "Fix TS + Ninja integration"
This reverts commit 1ef4eb754e.

Reason for revert: The generated tsconfig now use relative paths
instead of absolute paths, thus removing the usage of the
gn build target in the path.

Original change's description:
> Revert "Fix TS + Ninja integration"
>
> This reverts commit f9aef25689.
>
> DISABLE_THIRD_PARTY_CHECK=expected third_party changes with TS fixes
>
> Reason for revert: Currently causing the deterministic bots to fail (https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8888105239366430432/+/steps/compare_build_artifacts/0/stdout). Reverting until we understand why and can fix.
>
> We don't rely on this change yet anywhere so we're fine to revert without causing problems elsewhere.
>
> Original change's description:
> > Fix TS + Ninja integration
> >
> > * Tell Closure to autogenerate bridge files
> > * Copy _bridge.js files into correct place when generating TypeScript
> > * Fix TS Ninja integration to include copied TS generated files
> >
> > DISABLE_THIRD_PARTY_CHECK=expected third_party changes with TS fixes
> >
> > Bug: 1011811
> > Change-Id: Icbd7574b6bf98b36c8de3be1cb1634b355192e77
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2060506
> > Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> > Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
>
> TBR=tvanderlippe@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: Iedc3767deac2b6993c26a2c267ba303db0ca4af3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1011811
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2062591
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Changes to TypeScript Ninja integration

Bug: 1011811
Fixed: 1053887
Change-Id: Iccd7c93e8d628102c2f131c5769b3019040c024f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2062607
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-02-20 11:56:06 +00:00
Jack Franklin 1ef4eb754e Revert "Fix TS + Ninja integration"
This reverts commit f9aef25689.

DISABLE_THIRD_PARTY_CHECK=expected third_party changes with TS fixes

Reason for revert: Currently causing the deterministic bots to fail (https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8888105239366430432/+/steps/compare_build_artifacts/0/stdout). Reverting until we understand why and can fix.

We don't rely on this change yet anywhere so we're fine to revert without causing problems elsewhere.

Original change's description:
> Fix TS + Ninja integration
>
> * Tell Closure to autogenerate bridge files
> * Copy _bridge.js files into correct place when generating TypeScript
> * Fix TS Ninja integration to include copied TS generated files
>
> DISABLE_THIRD_PARTY_CHECK=expected third_party changes with TS fixes
>
> Bug: 1011811
> Change-Id: Icbd7574b6bf98b36c8de3be1cb1634b355192e77
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2060506
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>

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

Change-Id: Iedc3767deac2b6993c26a2c267ba303db0ca4af3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2062591
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-02-19 09:08:42 +00:00
Tim van der Lippe f9aef25689 Fix TS + Ninja integration
* Tell Closure to autogenerate bridge files
* Copy _bridge.js files into correct place when generating TypeScript
* Fix TS Ninja integration to include copied TS generated files

DISABLE_THIRD_PARTY_CHECK=expected third_party changes with TS fixes

Bug: 1011811
Change-Id: Icbd7574b6bf98b36c8de3be1cb1634b355192e77
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2060506
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-02-18 11:12:17 +00:00
Connor Clark 2bc3be29be Reland "[Lighthouse] Rename Audits panel to Lighthouse"
This reverts commit 0651468562.

Reason for revert: Cause of failure has been remedied. See: https://chromium-review.googlesource.com/c/chromium/src/+/2055398

Original change's description:
> Revert "[Lighthouse] Rename Audits panel to Lighthouse"
>
> This reverts commit 2ae53ef04d.
>
> Reason for revert: This CL breaks CI: https://ci.chromium.org/p/devtools-frontend/builders/ci/DevTools%20Linux/453. It looks like the layout test expects audits not lighthouse in the name, so it's probably in need of a 3-way merge.
>
> Original change's description:
> > [Lighthouse] Rename Audits panel to Lighthouse
> >
> > Change-Id: Ia2ab175d2a3b6c8ded73aff8ff0f5582f5a8fa0c
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2044605
> > Commit-Queue: Connor Clark <cjamcl@chromium.org>
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Paul Irish <paulirish@chromium.org>
>
> TBR=paulirish@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org,cjamcl@chromium.org
>
> Change-Id: Ia6d5f42a0e6ece4352696c51bf0de5754774cb0a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2051983
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>

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

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

Bug: 1052111
Change-Id: I638ca9bd5cd94e02fb7318f2a7d7c66fca40e6c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056866
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Connor Clark <cjamcl@chromium.org>
2020-02-18 01:56:25 +00:00
Jack Franklin e245d1a208 Include test/e2e in ESLint checks.
It already runs on `test/unittests` but
with this change we'll lint the e2e tests too.

Change-Id: I0e39ce9a4b0128207a04b1dfd6cf1ea2f25bf213
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2054159
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-02-14 11:58:54 +00:00
Paul Lewis 25ff1d1ca4 [e2e] Deprecate e2e script and introduce screenshots script
This CL downgrades the existing e2e script to a passthru. Once the bots
use the new script, this can be deprecated entirely.

The CL also updates the paths in the package.json

Bug: 1044632
Change-Id: I4a5bda44f7c212e648a58e72e95712b9c3c6e3e9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2054552
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-02-13 15:36:56 +00:00
Paul Lewis ca8bf73527 [tests] Migrates and tidies test runner
This CL migrates shared code from e2e, screenshots, and unit to a helper
file. It also introduces a unified runner for e2e and screenshots (and
perf once that's in place). Once this has landed I will remove
run_e2e.py and use run_test_suite.py instead.

Change-Id: I590e5eb6f3e8a4692767a2aa653b55685891614b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2054547
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-02-13 14:54:08 +00:00
Paul Lewis 6b060a01eb [test] Adds 'hello world' screenshot test
This CL is the initial commit for a screenshot test. A further CL will
provide tooling for updating the goldens.

Bug: 1051458
Change-Id: Id61dd0a804ad33566451e0f56f6981e3e7bd9067
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2051984
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-13 13:57:48 +00:00
Jack Franklin 8b9aa2fca6 Prefer eslint-mocha for linting .only in tests
DISABLE_THIRD_PARTY_CHECK=new npm module causes package-lock change

We can get rid of a custom script and use ESLint for these rules.

Additionally this means editors will highlight the issue in the editor.

Change-Id: I552b52e7f07b4e7430b3f685dbc3b5fad36ffff2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2052167
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-02-12 18:12:22 +00:00
Paul Lewis a730f62726 Enable colored output from test subprocesses
R=tvanderlippe@chromium.org

Change-Id: Ia0754f892841ee9b06930da8605bb8bad33084ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2052165
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-02-12 18:02:03 +00:00
Paul Lewis 0651468562 Revert "[Lighthouse] Rename Audits panel to Lighthouse"
This reverts commit 2ae53ef04d.

Reason for revert: This CL breaks CI: https://ci.chromium.org/p/devtools-frontend/builders/ci/DevTools%20Linux/453. It looks like the layout test expects audits not lighthouse in the name, so it's probably in need of a 3-way merge.

Original change's description:
> [Lighthouse] Rename Audits panel to Lighthouse
> 
> Change-Id: Ia2ab175d2a3b6c8ded73aff8ff0f5582f5a8fa0c
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2044605
> Commit-Queue: Connor Clark <cjamcl@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Paul Irish <paulirish@chromium.org>

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

Change-Id: Ia6d5f42a0e6ece4352696c51bf0de5754774cb0a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2051983
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-02-12 11:06:32 +00:00
Connor Clark 2ae53ef04d [Lighthouse] Rename Audits panel to Lighthouse
Change-Id: Ia2ab175d2a3b6c8ded73aff8ff0f5582f5a8fa0c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2044605
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2020-02-11 22:43:22 +00:00
Paul Lewis 853bb7e903 Restores .only PRESUBMIT check
TBR=tvanderlippe@chromium.org
Bug: 1009443
Change-Id: I99cd8a7526e24d57d07175c280d31420a59249fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2046552
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-10 19:11:30 +00:00
Tim van der Lippe 90c7bd3fe9 Fix e2e typescript configuration
There were multiple issues:
1. The e2e project was accidentally recompiling the shared files again,
thus we needed to use project references for that
2. There was a difference in configuration of the root project and the
e2etests. As such, make sure to extend the root config.
3. The code was being transpiled down to es5, which is not necessary as
we run a recent version of Node. Thus, we can use `esnext` instead.
Debugging scripts should now be a lot easier, especially as
`async-await` are no longer transpiled.

For now, strict is turned off, as there are various errors that pop up.
I will clean that up in a follow-up CL.

Bug: 1044632
Change-Id: Ie0cf29a1ddd1e027bcc107d2567283eaaaa7fead
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2047183
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-10 14:44:40 +00:00
Yang Guo fa34ae8b22 chmod +x scripts/test/run_e2e.py
So that it's consistent with the other test runners.

R=aerotwist@chromium.org

Change-Id: I8be3664055d1ad398f0633ea17815d325ea0b560
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2042618
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2020-02-07 11:58:50 +00:00
Paul Lewis 96a0b3c224 [e2e] Performs cleaner shutdown
Bug: 1044632
Change-Id: I86252d31a411e82e44bbf902e65501e9f6807939
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2042090
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2020-02-06 16:08:27 +00:00
Paul Lewis bd88d7fb19 [e2e] Moves hosted mode server to JS side
Change-Id: I864dba4c988716215d18cb32b59c539d966cb9fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2037997
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-05 17:11:13 +00:00
Paul Lewis 32473f08f9 [e2e] Moves shared logic out of e2e
We plan to have multiple suites using the same machinery that currently
runs the e2e. This CL moves that machinery out to a shared folder and
remaps the e2e code to use everything in the new locations.

Future CLs will introduce additional suites for capturing traces,
screenshots, and other artifact.

Change-Id: I452424d8f65fb03897f5a59606c592be996e91ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2035949
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-02-05 16:01:03 +00:00
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
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 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 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
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
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
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 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 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 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
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
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 c523feb710 Updates unit tests to use new devtools_paths
Change-Id: Id076878f5f51348ff80ce1adc018b148246c087f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947527
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-12-03 10:53:56 +00:00
Paul Lewis e8d888e39d Defaults the number of boot perf runs to 37
Change-Id: Icb57c9b3c116f01eeeadeca184864085edd008db
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947526
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
2019-12-03 10:44:46 +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
Tim van der Lippe e6974cd0ab Fix duplicate skip_compilation files
modular_build can compute all skip_compilation files, which saves us
some duplication run_type_check

Bug:1006759
Change-Id: Id8eff10fa716f7cb17d36aa18b54605f26dba713
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1934219
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-27 16:16:43 +00:00