Commit Graph
1246 Commits
Author SHA1 Message Date
Tim van der Lippe 62e4435627 Update TypeScript to 3.8.3
This includes the fix for
https://github.com/microsoft/TypeScript/issues/36989 which was blocking
the typescript-ification of `host`.

R=szuend@chromium.org
DISABLE_THIRD_PARTY_CHECK=Update typescript

Bug: 1011811
Change-Id: I637861d247ce4b696b0177e0bd8cd31243a47f98
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2083148
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-02 18:16:46 +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
Paul Lewis fc33efbfc6 [screenshot] Updates server encoding
Change-Id: I80bf3714ff2740f0dd3e63d3f25d5c152a6bb322
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2072385
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-02-26 08:49:54 +00:00
Wolfgang Beyer 585ded41b5 Revert "Use 1000 not 1024 for kB and MB calculations"
This reverts commit e4d2472814.

Reason for revert: Further discussions are needed to ensure
consistency between DevTools and Lighthouse on how to calculate
kb/MB.

Original change's description:
> Use 1000 not 1024 for kB and MB calculations
> 
> This removes the usage of the number 1024 for the calculation of kB and
> MB values. Instead the correct value of 1000 is used.
> The changes mostly affect the file/transfer size values seen in the
> network tab (screenshot: https://imgur.com/a/cDqxScS).
> 
> Bug: chromium:1035309
> Change-Id: Ic3fe4fc6536326d44fc9f838189db9b0c19d0955
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2062606
> Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>

TBR=mathias@chromium.org,wolfi@chromium.org

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

Bug: chromium:1035309
Change-Id: I60dd9be51a097166889db9d7206ad251be6d2235
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2071878
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2020-02-25 09:00:57 +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 54c6faa18b Add e2etest for cacheable responses in the network panel
I also discovered that the checkboxes we had in DevTools where not
properly accessible. While there was some logic to let a label element
be the aria-describedby for the input element, because they were both in
the shadow dom, it didn't do anything. Setting the appropriate
aria-label fixes that issue.

Secondly, the hosted_mode server now implements caching based on ETags.

This replaces
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/http/tests/devtools/startup/resource-tree/resource-tree-mimetype.js;l=1;drc=77578ccb4082ae20a9326d9e673225f1189ebb63?originalUrl=https:%2F%2Fcs.chromium.org%2F
as an e2etest

Bug: 1044632
Change-Id: I3283b791d1d9a9673363d7cbb897d3f5c6c03ed0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2062603
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-20 16:02:26 +00:00
Tim van der Lippe 822e99179c Add test for utf-8 character encoding
It also updates the hosted_mode server to serve JavaScript files with
the correct encoding. If we don't, the unicode characters that we use in
the DevTools implementations are garbled in either the source code or
test code.

This replaces
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/http/tests/devtools/startup/resource-tree/main-resource-content.js;l=1;drc=77578ccb4082ae20a9326d9e673225f1189ebb63?originalUrl=https:%2F%2Fcs.chromium.org%2F
as an e2etest

Bug: 1044632
Change-Id: Ie6b714f33685bc0d67b63b24c61911b0c8ecefe3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2062588
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-20 15:39:16 +00:00
Tim van der Lippe 00e15811f5 Update TypeScript to 3.8.1RC
This fixes an issue where property assignments to static methods (please
don't ask me why we have them) would erroneously omit the static method
from the declaration file.

This is fixed in the latest version of TypeScript, most likely as part
of https://github.com/microsoft/TypeScript/issues/36270

DISABLE_THIRD_PARTY_CHECK=Updating TypeScript

Bug: 1011811
Change-Id: I2744ef44c040fdf001f6b0be9e64a164510e0fea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2064668
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-20 12:04:17 +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
Wolfgang Beyer e4d2472814 Use 1000 not 1024 for kB and MB calculations
This removes the usage of the number 1024 for the calculation of kB and
MB values. Instead the correct value of 1000 is used.
The changes mostly affect the file/transfer size values seen in the
network tab (screenshot: https://imgur.com/a/cDqxScS).

Bug: chromium:1035309
Change-Id: Ic3fe4fc6536326d44fc9f838189db9b0c19d0955
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2062606
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-02-20 08:05:05 +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
Wolfgang Beyer 24e80608d1 Revert "Reland "Use 1000 not 1024 for kB and MB calculations""
This reverts commit d75b4fefd4.

Reason for revert: breaks on rolling into chromium
Link: https://ci.chromium.org/p/chromium/builders/try/linux-chromeos-rel/496073

Original change's description:
> Reland "Use 1000 not 1024 for kB and MB calculations"
> 
> This is a reland of 759a1364c7
> 
> Original change's description:
> > Use 1000 not 1024 for kB and MB calculations
> > 
> > This removes the usage of the number 1024 for the calculation of kB and
> > MB values. Instead the correct value of 1000 is used.
> > The changes mostly affect the file/transfer size values seen in the
> > network tab (screenshot: https://imgur.com/a/cDqxScS).
> > 
> > Bug: chromium:1035309
> > Change-Id: I2b3e811496f5c99b7b2d77a66834c242f0620df2
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056480
> > Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
> > Reviewed-by: Mathias Bynens <mathias@chromium.org>
> 
> Bug: chromium:1035309
> Change-Id: Ice93c7d16897e54ecee5a5dd298223971c31e90e
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2061728
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>

TBR=mathias@chromium.org,wolfi@chromium.org

Change-Id: I8533e20f557ade56366989a91a2834be6f2d96a4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1035309
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2061730
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2020-02-18 11:56:36 +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
Wolfgang Beyer d75b4fefd4 Reland "Use 1000 not 1024 for kB and MB calculations"
This is a reland of 759a1364c7

Original change's description:
> Use 1000 not 1024 for kB and MB calculations
> 
> This removes the usage of the number 1024 for the calculation of kB and
> MB values. Instead the correct value of 1000 is used.
> The changes mostly affect the file/transfer size values seen in the
> network tab (screenshot: https://imgur.com/a/cDqxScS).
> 
> Bug: chromium:1035309
> Change-Id: I2b3e811496f5c99b7b2d77a66834c242f0620df2
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056480
> Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>

Bug: chromium:1035309
Change-Id: Ice93c7d16897e54ecee5a5dd298223971c31e90e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2061728
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2020-02-18 08:17:46 +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
Mathias Bynens fc21799269 Revert "Use 1000 not 1024 for kB and MB calculations"
This reverts commit 759a1364c7.

Reason for revert: broke the tree https://ci.chromium.org/p/devtools-frontend/builders/ci/DevTools%20Linux/508

Original change's description:
> Use 1000 not 1024 for kB and MB calculations
> 
> This removes the usage of the number 1024 for the calculation of kB and
> MB values. Instead the correct value of 1000 is used.
> The changes mostly affect the file/transfer size values seen in the
> network tab (screenshot: https://imgur.com/a/cDqxScS).
> 
> Bug: chromium:1035309
> Change-Id: I2b3e811496f5c99b7b2d77a66834c242f0620df2
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056480
> Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>

TBR=mathias@chromium.org,wolfi@chromium.org

Change-Id: I69a34847e838a83e1795f316e782870a7fc42d8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1035309
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2060493
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-02-17 15:10:55 +00:00
Wolfgang Beyer 759a1364c7 Use 1000 not 1024 for kB and MB calculations
This removes the usage of the number 1024 for the calculation of kB and
MB values. Instead the correct value of 1000 is used.
The changes mostly affect the file/transfer size values seen in the
network tab (screenshot: https://imgur.com/a/cDqxScS).

Bug: chromium:1035309
Change-Id: I2b3e811496f5c99b7b2d77a66834c242f0620df2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056480
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-02-17 12:52:27 +00:00
Tim van der Lippe c53ba5018f Only consider module.json files for remove unused globals
This will allow us to cleanup all -legacy files with any unused globals
that are not referenced in both the layout tests or module.json files.

Bug: 1006759
Change-Id: I4884884529c4d08fd19a8e0db9edd758f6eacf03
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2055063
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-14 15:31:44 +00:00
Paul Lewis ed36b86660 Updates node_modules to remove resemblejs
DISABLE_THIRD_PARTY_CHECK=Updating node_modules requires changing package.json and manage_node_deps.py

Change-Id: I08d05d8c92e501baeb0780ee06cea9b12887ee57
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056474
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-02-14 12:21:53 +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 ea0d7566dc [tests] Adds resemblejs and rimraf to node_modules
This CL adds deps that are necessary for comparing images in node, which
will be part of screenshot testing.

DISABLE_THIRD_PARTY_CHECK=Changes to deps require updating package-lock.json

Change-Id: I3b6266e7a8a6042cb14f1f6bfa40ca5a921592f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2050781
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-02-12 13:59:13 +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
Paul Lewis dac9b5e74f Adds karma-sinon to DEPS
R=jacktfranklin@chromium.org
DISABLE_THIRD_PARTY_CHECK=Changes to deps require updating package-lock.json

Change-Id: Ic83355b2d873f0690d4c357bdd42a4833946f594
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2050776
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-02-12 09:54:22 +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
Jack Franklin 1a165367ec Add @types/sinon as a dependency.
Such that we get nice TS checks when using Sinon in our unit tests.

DISABLE_THIRD_PARTY_CHECK=the package-lock has to change when we install
a new NPM module.

Change-Id: I99d72b526028c473993ff7be8632100046b92681
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2050234
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-02-11 15:07:41 +00:00
Jack Franklin b5bbcc0078 Add sinonjs@8.1.1 dependency
This will be used to build out mocking in the devtools frontend unit tests.

DISABLE_THIRD_PARTY_CHECK=message doesn't apply with this change (checked with aerotwist@).

Change-Id: Ie623b4fb35677c8c4a5e52d5e75180346da6e3fd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2050225
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-11 14:49:21 +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
Tim van der Lippe 1e74ce74a9 Add e2etest for Last-Modified parsing in network tab
It uses a `.rawresponse` file that forcibly sets the `Last-Modified`
header. We then open the network panel, add the `Last-Modified` column
to the data-grid and then introspect its values.

As part of this patch, each context submenu now gets an `aria-label`.
These attributes are redundant here, since they mirror the computed
accessible name of these elements. The reason they're added is that we
use this label in the selectors of the end-to-end test.

This replaces
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/http/tests/devtools/startup/resources/cached-resource-metadata.html;drc=77578ccb4082ae20a9326d9e673225f1189ebb63?originalUrl=https:%2F%2Fcs.chromium.org%2F
as an e2etest.

Bug: 1047671
Change-Id: I89efc145c915f1a083dbcfb3765674122d9748fe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2039270
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-02-07 12:55:30 +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 24dcb2c127 Updates 403 message in Hosted Mode server
TBR=tvanderlippe@chromium.org

Change-Id: Iccc270640c1449dd48ef1e8e84228f26be8aa2f5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2042614
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-02-07 09:21:20 +00:00
Eric Leese c43516c5f8 e2e test for wasm raw debugging
Adds a test that breaks with a wasm call frame and verifies
that the correct line in the wasm disassembly is highlighted.

Bug: chromium:1045573
Change-Id: Ibf68063d947fec0ba178ab8ec7e5137fec6ebaa6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2038701
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2020-02-07 09:04:30 +00:00
Liviu Rau 73f1b60756 Whitespace to trigger builders
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I4b57a2304ef72650264ec3e6867ae447e9633937
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2042103
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2020-02-06 16:48:47 +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
Yang Guo 49346f1e67 Remove experiments query param from scripts
R=mathias@chromium.org

Bug: 1048124
Change-Id: I4bbd6b9566c6687a2bda2258969025bc53f69a32
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2041430
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2020-02-06 11:54:17 +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
Paul Lewis 285715ec7b [e2e] Fix exit code and paths for bots.
TBR=tvanderlippe@chromium.org
Change-Id: I23c5ed10eb5561129d249c6d16da2781f5f18c06
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2037485
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-05 15:43:33 +00:00
Philip Pfaffe 422e2f6cd7 Report the content type for wasm modules in hosted mode
In the hosted_mode server, set the appropriate content type when serving
wasm modules.

Change-Id: I9ce8ed32804b0b0afe0a2110faedae6ce51f4478
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2035795
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2020-02-03 16:10:49 +00:00
Tim van der Lippe 1418552cad Remove bundled Runtime.js
After
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2030781
all entrypoints properly import the Runtime.js. As such, we no longer
need to force-bundle the Runtime in any entrypoint.

Bug: 1046596, 1006759
Change-Id: I0b1d14f3857b4c9511e14f416ddf7774e7d0071b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2031122
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-03 13:50:28 +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
Tim van der Lippe 912cec0c68 Add istanbul-diff to node_modules
DISABLE_THIRD_PARTY_CHECK=Adding istanbul-diff to node_modules

Bug: chromium:1044881
Change-Id: Ia80f499622132ce9b2c0890147fecdd4530886c7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2024871
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-01-28 15:21:23 +00:00