Commit Graph
57 Commits
Author SHA1 Message Date
Sigurd Schneider b54b602422 Rename ClearStorageView to StorageView
This CL also converts the layout test storage-view-reports-quota.js
to an e2e test.

Bug: chromium:945786
Change-Id: I9ae73e41e564318474089e7ba312f3379893e847
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2667200
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-02-05 15:45:29 +00:00
Sigurd Schneider 91456a6136 Uncouple layout test from DevTools internals
This CL introduces a helper on the ApplicationTestRunner an
internal of DevTools (which class the Storage view in the application
panel has) from the layout test.

Bug: chromium:945786
Change-Id: I66bf01c30d3121ffabee0e176b060d878346dbdc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2676146
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-02-05 09:43:08 +00:00
Adam Raine a53fe498d6 [Lighthouse] Roll Lighthouse 7.0.1
Bug: 772558
Change-Id: I69ec0588084595a91ad797fb8bb2c994cf667c00
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2650244
Commit-Queue: Adam Raine <asraine@google.com>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
2021-01-28 22:35:22 +00:00
Connor Clark c34246abbf Reenable layout test http/tests/devtools/audits/audits-export-run.js
Bug: 1036525
Change-Id: I5eb30589be374119e3cccd464871c27d97a050d5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2643584
Reviewed-by: Paul Irish <paulirish@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-01-27 06:06:24 +00:00
Connor Clark 3be8a6b938 [Lighthouse] Avoid reprocessing the same Network events.
Also adds test `lighthouse-block-url.js`, which passes
even without this change. I wanted confidence that any
future refactor here will retain the benefits of multi-client.

In short: DevTools is sending the "same" messages to Lighthouse
for the root session: one without a session id (good, expected, LH and
DT assumes this means it comes from the main target), and one also
for the main target but with an explicit sessionId (bad, we end
up double-processing things). This is an overlooked side effect of the
"multi client" work:

- https://chromium-review.googlesource.com/c/chromium/src/+/1743411
- https://chromium-review.googlesource.com/c/chromium/src/+/1838310

This CL is a rather narrow change, but it's important as we are
currently double-counting the size of most requests, which
is a big problem for accuracy. There are likely issues with other domains
sending multiple events. A more involved fix will require a closer
look at the protocol connection juggling going on here.

See https://github.com/GoogleChrome/lighthouse/issues/11415

Change-Id: Ife7296dbd08153784ef700e761d529ffe4b39272
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2607769
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Connor Clark <cjamcl@chromium.org>
2021-01-08 20:43:57 +00:00
Paul Irish 70441189df [Lighthouse] Roll Lighthouse 7.0.0
Bug:772558
Change-Id: Ibb89316cc495c3be1d273655ae79e8ba90902bb5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2597812
Auto-Submit: Paul Irish <paulirish@chromium.org>
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
2020-12-21 22:52:16 +00:00
Wolfgang Beyer 6052063067 Remove "blackbox" - refactor blackbox-a11y-test.js
This patch replaces unwelcoming language with better terms.

Bug: 1152082
Design doc: http://doc/1UnwKLgjYPDsLsYCBh9LKiaPN6Aq2XLKvt4Ak3FT7J3k

Change-Id: I44c6c276cc8ecc25362e48bb7f5492c2d28bcdf4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2597309
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2020-12-21 08:16:45 +00:00
Tim van der Lippe ed61abde18 Enable no-implicit-coercion ESLint rule for test/
R=jacktfranklin@chromium.org

Bug: 1082789
Change-Id: Ibb356637e115dc811c165fb0ad33a60a99105e79
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2595267
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-16 15:40:04 +00:00
Wolfgang Beyer 87e3369110 Replace usage of 'blackbox' in UI
This patch replaces unwelcoming language with better terms.

'Blacklist' is replaced with 'Ignore List'. These changes primarily
target user-facing strings, further usage of 'blackbox' will be removed
in follow-up CLs.

Screenshot: https://i.imgur.com/7WhyOjN.png
Bug: 1152082
Design doc: http://doc/1UnwKLgjYPDsLsYCBh9LKiaPN6Aq2XLKvt4Ak3FT7J3k
Backend disable tests: https://crrev.com/c/2580885
Backend update tests: https://crrev.com/c/2581839


Change-Id: I30d1ac5900c375333327aafbcc17be80f85542e5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581542
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-12-11 11:50:37 +00:00
Connor Clark 5921e781cd [Lighthouse] Roll Lighthouse 6.5.0
Bug: 772558
Change-Id: I8a9283c0b555caa63c7c331593437fb551fc8fd2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2575515
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2020-12-08 01:54:15 +00:00
Tim van der Lippe b736005f57 Remove HTMLElement title prototype override
All of the setters/getters have been migrated to
UI.Tooltip.Tooltip.{install/getContent} respectively.

R=jacktfranklin@chromium.org

Fixed: 1150762
Change-Id: I229bd9fbecd71b94d053e7325693e519de6a3897
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562343
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-30 13:07:48 +00:00
Sigurd Schneider b17db0d051 DevTools: Allow users to override storage quota size.
This patch adds an interface at DevTools>Application to allow users to
override the quota size for the current origin. At the backend, the
QuotaManager maintains a map from origins to emulated quota size.

Corresponding Chromium CL: https://crrev.com/c/2122473
Doc: https://docs.google.com/document/d/1gSZRjwgz4T0Dl8GSrN8BTFKVvw8-dCehIQOJsBVsOgc/edit#
Bug:945786
Change-Id: I2d19d7b749ebec26202039f29477145299904a41
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2123048
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-11-05 09:27:11 +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
Sigurd Schneider 370b00fe93 [ts] Type-check resources/ServiceWorkersView.js with TypeScript
Bug: chromium:1011811
Change-Id: I7a86dc5831ea2035f5cce2dac9edf43ff8206359
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2505655
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-28 18:07:17 +00:00
Adam Raine 3226e93291 Add warning about important data in Lighthouse panel
Lighthouse users are sometimes unaware that auditing a page can clear
potentially important resources:
https://github.com/GoogleChrome/lighthouse/issues/772

Lighthouse will no longer clear resources in IndexedDB, WebSQL, or
local storage when auditing a page. Since that change may affect
performance scores, Lighthouse will display a top level warning in the
report when data was found in any of those three locations. The warning
tells the user they should audit in an incognito window.

This CL adds an additional warning to the Lighthouse DevTools panel
which conveys the same information.

Preview:
https://imgur.com/nN1ZfFR

Bug: 806488
Change-Id: I64fd9e197868f690af0e0b89de52e0b7baa3f1fa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2385182
Commit-Queue: Adam Raine <asraine@google.com>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-10-08 15:25:37 +00:00
Adam Raine b8265a3093 [Lighthouse] Roll Lighthouse 6.4.0
Bug: 772558
Change-Id: Iab1d115572e1b98319eda1d375d9daadf96912f8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2441877
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Adam Raine <asraine@google.com>
2020-10-01 02:25:48 +00:00
Connor Clark 88d9ad2f3b [Lighthouse] Translate the Lighthouse report based on system locale.
Bug: 941561
Change-Id: I8d20f83077f3d0b124e64838fac6bf176c90ac33
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2382176
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2020-09-02 21:52:01 +00:00
Connor Clark aac228ce1b [Lighthouse] Roll Lighthouse 6.3.0
Bug: 772558
Change-Id: I95bb7d9bfc5e192e1a4a2ac865dd3cb43b7fa582
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2380039
Commit-Queue: Paul Irish <paulirish@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2020-08-27 19:54:57 +00:00
Adam Raine f46d158df8 Change 'View Trace' button to indicate throttling method
Lighthouse issue:
https://github.com/GoogleChrome/lighthouse/issues/9971

The 'View Trace' button can lead to confusing results when using
simulated throttling because the timings in the original trace do not
match the metric results.

This CL renames the 'View Trace' button to be 'View Original Trace' and
adds a tooltip to clarify the situation.  If active throttling is used
then the button reverts to 'View Trace' and hides the tooltip.

Change-Id: I8ade46c3031dafc381237559dde27181529177fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2339861
Commit-Queue: Adam Raine <asraine@google.com>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
2020-08-17 22:44:37 +00:00
Connor Clark ca50c1ef5f [Lighthouse] Roll Lighthouse 6.2.0
Bug: 772558

Change-Id: I2db72f6ceabb6a7de00f491d029fd75ef167e7ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2341956
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
2020-08-07 02:13:51 +00:00
John Emau aff115d380 [Lighthouse] Expect long-tasks audit to flake
Because long-tasks relies on time taken to complete a task [1],
the result is dependent on the performance of the machine running the test
and may result in the score `notApplicable`.

This has been flaky on some Win10 machines.

[1]: https://github.com/GoogleChrome/lighthouse/blob/cfce99ad1f0ae/lighthouse-core/audits/long-tasks.js#L116

Change-Id: I013db04f55b54c35c327b37dfa0090db9b86bea0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2293054
Reviewed-by: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Commit-Queue: John Emau <John.Emau@microsoft.com>
2020-07-11 00:25:43 +00:00
Alex Rudenko f4e87e579e Fix disappearing local filesystems when group mode is changed
When the setting "Group by folder" is changed, the entire sources UI
is rerendered. Rerendering removes filesystem subfolder nodes that are
added based on the events from the underlying workspace. Therefore,
the local filesystem didn't render after you change the setting. This
CL adds a call to _resetWorkspace to re-fetch workspace folders when
the UI is reset.

Test expectations updated in https://chromium-review.googlesource.com/c/chromium/src/+/2279816

Fixed: chromium:829319
Bug: chromium:1066415
Change-Id: I0cbb481f26a7f9bb747b0ed608b6cee2bdbd856c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279834
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-07-03 12:42:09 +00:00
Connor Clark c55849a782 [Lighthouse] Roll Lighthouse 6.1.0
Bug: 772558

Change-Id: I8b6005d53dad54a398a6ddd2fe4cc4c056e08a7f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2268246
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2020-06-25 23:44:53 +00:00
Paul Irish 67aa7a28dd Audits: Roll Lighthouse 6.0.0 (7e4fa5587)
Built from https://github.com/GoogleChrome/lighthouse/tree/v6
Diff: https://github.com/GoogleChrome/lighthouse/compare/dt-600rc1..v6
Bug: 772558
Change-Id: I9979d26bb09613873b2b65fd293c1b5a8905e009
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2200644
Auto-Submit: Paul Irish <paulirish@chromium.org>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
2020-05-14 08:07:24 +00:00
Paul Irish bf20468f57 Audits: Roll Lighthouse 6.0.0-rc.1 (0d6f7e799)
Adds: desktop scoring for LCP/TBT, Snyk roll, Score calculator link
Fixes: Uses pubads-1.1.0-beta release

Built from https://github.com/GoogleChrome/lighthouse/tree/dt-600rc1
Diff: https://github.com/GoogleChrome/lighthouse/compare/dt-600rc0..dt-600rc1
Bug: 772558
Change-Id: Ib725c3f3a87abe75243051233a2f621e19ee71d2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199999
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Auto-Submit: Paul Irish <paulirish@chromium.org>
2020-05-13 23:38:54 +00:00
Paul Irish ac18cd0f55 Audits: Roll Lighthouse 6.0.0-rc.0 (074ca8c481)
Built from https://github.com/GoogleChrome/lighthouse/tree/v6dtroll

Bug: 772558
Change-Id: I63ab5367cb5e55776c77d69d1410490e6c6f03c7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2197239
Commit-Queue: Paul Irish <paulirish@chromium.org>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Auto-Submit: Paul Irish <paulirish@chromium.org>
2020-05-13 01:37:10 +00:00
Mathias Bynens 4e1cc676b6 Reland "Enable emulating locales"
This reverts commit 012f9c0fc7.

Reason for revert: upstream web test is now temporarily disabled
https://chromium-review.googlesource.com/c/chromium/src/+/2119533

Original change's description:
> Revert "Enable emulating locales"
>
> This reverts commit a36992378f.
>
> Reason for revert: https://ci.chromium.org/p/chromium/builders/try/mac-rel/333856?
>
> Original change's description:
> > Enable emulating locales
> >
> > This patch adds support for emulating locales through the Sensors
> > drawer. Similar to timezone emulation, it’s tied to geolocation
> > emulation, completing the “user location emulation” feature set.
> >
> > Locale emulation affects:
> >
> > - *.prototype.toLocaleString
> >   e.g. `123_456..toLocaleString()`
> > - Intl.* APIs
> >   e.g. `new Intl.NumberFormat().resolvedOptions().locale`
> > - navigator.language
> > - navigator.languages
> > - the Accept-Language HTTP header
> >
> > Note that until chromium:1057096 gets fixed, updates to
> > `navigator.language` and `navigator.languages` are not visible
> > immediately, but only after the next navigation/page reload.
> >
> > Changes to the `Accept-Language` HTTP header are only reflected
> > for subsequent requests (but that’s unsurprising).
> >
> > Once chromium:1051186 is fixed, we can simplify the implementation
> > by dropping the call to Emulation.setUserAgentOverride.
> >
> > Boring but useful test/demo pages:
> > - https://mathiasbynens.be/demo/locale
> > - https://mathiasbynens.be/demo/locale#includeExtras
> >
> > Demo video: https://www.youtube.com/watch?v=lZEFwACYPo0
> >
> > Design doc: https://goo.gle/devtools-locale-emulation
> >
> > Bug: chromium:1051186, chromium:1051822, chromium:1057096
> > Change-Id: I0371f450ed23511816941f3a59c14236aea64408
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082371
> > Commit-Queue: Mathias Bynens <mathias@chromium.org>
> > Reviewed-by: Changhao Han <changhaohan@chromium.org>
>
> TBR=mathias@chromium.org,changhaohan@chromium.org
>
> Change-Id: Iffcacdb304aa107c787266e07dca87cadbe79337
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1051186, chromium:1051822, chromium:1057096
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116238
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>

TBR=yangguo@chromium.org,mathias@chromium.org,changhaohan@chromium.org

Cq-Depend: chromium:2119533
Change-Id: I003287fd4524dd88aceac0dbfb7e88e90f26b03f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1051186, chromium:1051822, chromium:1057096
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119672
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-03-25 09:44:42 +00:00
Yang Guo 012f9c0fc7 Revert "Enable emulating locales"
This reverts commit a36992378f.

Reason for revert: https://ci.chromium.org/p/chromium/builders/try/mac-rel/333856?

Original change's description:
> Enable emulating locales
> 
> This patch adds support for emulating locales through the Sensors
> drawer. Similar to timezone emulation, it’s tied to geolocation
> emulation, completing the “user location emulation” feature set.
> 
> Locale emulation affects:
> 
> - *.prototype.toLocaleString
>   e.g. `123_456..toLocaleString()`
> - Intl.* APIs
>   e.g. `new Intl.NumberFormat().resolvedOptions().locale`
> - navigator.language
> - navigator.languages
> - the Accept-Language HTTP header
> 
> Note that until chromium:1057096 gets fixed, updates to
> `navigator.language` and `navigator.languages` are not visible
> immediately, but only after the next navigation/page reload.
> 
> Changes to the `Accept-Language` HTTP header are only reflected
> for subsequent requests (but that’s unsurprising).
> 
> Once chromium:1051186 is fixed, we can simplify the implementation
> by dropping the call to Emulation.setUserAgentOverride.
> 
> Boring but useful test/demo pages:
> - https://mathiasbynens.be/demo/locale
> - https://mathiasbynens.be/demo/locale#includeExtras
> 
> Demo video: https://www.youtube.com/watch?v=lZEFwACYPo0
> 
> Design doc: https://goo.gle/devtools-locale-emulation
> 
> Bug: chromium:1051186, chromium:1051822, chromium:1057096
> Change-Id: I0371f450ed23511816941f3a59c14236aea64408
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082371
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Reviewed-by: Changhao Han <changhaohan@chromium.org>

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

Change-Id: Iffcacdb304aa107c787266e07dca87cadbe79337
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1051186, chromium:1051822, chromium:1057096
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116238
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2020-03-24 19:25:12 +00:00
Mathias Bynens a36992378f Enable emulating locales
This patch adds support for emulating locales through the Sensors
drawer. Similar to timezone emulation, it’s tied to geolocation
emulation, completing the “user location emulation” feature set.

Locale emulation affects:

- *.prototype.toLocaleString
  e.g. `123_456..toLocaleString()`
- Intl.* APIs
  e.g. `new Intl.NumberFormat().resolvedOptions().locale`
- navigator.language
- navigator.languages
- the Accept-Language HTTP header

Note that until chromium:1057096 gets fixed, updates to
`navigator.language` and `navigator.languages` are not visible
immediately, but only after the next navigation/page reload.

Changes to the `Accept-Language` HTTP header are only reflected
for subsequent requests (but that’s unsurprising).

Once chromium:1051186 is fixed, we can simplify the implementation
by dropping the call to Emulation.setUserAgentOverride.

Boring but useful test/demo pages:
- https://mathiasbynens.be/demo/locale
- https://mathiasbynens.be/demo/locale#includeExtras

Demo video: https://www.youtube.com/watch?v=lZEFwACYPo0

Design doc: https://goo.gle/devtools-locale-emulation

Bug: chromium:1051186, chromium:1051822, chromium:1057096
Change-Id: I0371f450ed23511816941f3a59c14236aea64408
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082371
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2020-03-24 12:43:32 +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
Tsuyoshi Horo 97de13d710 Remove sxg-with-network-service virtual tests from devtools-frontend
Bug:1057538
Change-Id: I0d16e993bc0998b08b0f9f6715973d4daf1d998b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082662
Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
2020-03-02 22:21:57 +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
Tim van der Lippe ff5ad47b82 Remove typedefs from {resources,sdk,search,security}-legacy.js
Bug: 1006759
Change-Id: I1d04169013b54a4b78e9dfd1fa77ad97e49ca870
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2060006
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-18 15:20:16 +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
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
Robert Ma 3c0114c639 Declare tags in expectation files
These declarations are required by typ to correctly parse the files.

Bug: 986447
Change-Id: I7573298781ea94a59b9e16e1ac6a6a9440324588
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2033236
Commit-Queue: Robert Ma <robertma@chromium.org>
Auto-Submit: Robert Ma <robertma@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-31 16:02:06 +00:00
Paul Lewis 4ae5f4f5ce [Global] Update refs to SDK.targetManager
Bug: 1006759
Change-Id: I0686ef929b89e75c2ea8a731c593d955eca85935
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2015119
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 10:56:40 +00:00
Mathias Bynens 2abdc799d9 Restore sorted object property order in expanded view
A long time ago in a galaxy far, far away, there was a property order
mismatch between the DevTools Console Preview and the expanded view.

For example:

       input> ({ c: 1, b: 1, a: 1 })
     preview> {c: 1, b: 1, a: 1}
    expanded> {a: 1, b: 1, c: 1, __proto__: Object}

We then attempted [1] to remove the confusing mismatch as follows:

       input> ({ c: 1, b: 1, a: 1 })
     preview> {c: 1, b: 1, a: 1}
    expanded> {c: 1, b: 1, a: 1, __proto__: Object}

In addition to avoiding the mismatch, this patch made DevTools more
closely resemble the internal shapes of objects [2] instead of hiding
this information from developers.

However, since shipping, we've heard overwhelming feedback in favor of
restoring the old behavior, where the expanded view is sorted. As a
result of this feedback, this patch restores the sorting logic.

A Chromium-side CL [3] temporarily disables the relevant web tests.
Once this patch lands and rolls into Chromium, we can re-enable these
tests with the up-to-date expectations.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/1806457
[2]: https://mathiasbynens.be/notes/shapes-ics
[3]: https://chromium-review.googlesource.com/c/chromium/src/+/1971832

Bug: chromium:989514, chromium:1008910
Change-Id: I5438987d73b8b980080156b5dd8b11f3f19fcc10
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1969479
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2019-12-18 10:25:38 +00:00
Simon Zünd 6a3eff7074 Mark audits web tests as 'slow'
These tests were marked as slow previously in the chromium repo. Remark them
as 'Slow' in the frontend repo since we have test failures on the bots
otherwise.

Drive-by: Disable a test that is now crashing and needs investigation.

TBR: tvanderlippe@chromium.org
Bug: chromium:1034903
Change-Id: I5c4b5c4d6fb8ab58546abd948991e964fd6ddbfe
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1971412
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@google.com>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2019-12-17 10:54:06 +00:00
Tim van der Lippe 05361f5ce9 Reland "Let console asserts show up in the test results"
This reverts commit 647f5e462f.

Reason for revert: Failing assertions have been added to test expectations

Original change's description:
> Revert "Let console asserts show up in the test results"
> 
> This reverts commit 1320cca621.
> 
> Reason for revert: Blocks the roll currently by causing layout
> tests to fail on Mac OS:
> https://ci.chromium.org/p/chromium/builders/try/mac-rel/262024
> 
> Failing layout test:
> https://test-results.appspot.com/data/layout_results/mac-rel/262024/webkit_layout_tests%20%28retry%20shards%20with%20patch%29/layout-test-results/results.html
> 
> Original change's description:
> > Let console asserts show up in the test results
> > 
> > Change-Id: I73c74000df80a1b46c31d35fd29c7fea0a9142bb
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962365
> > Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> 
> TBR=szuend@chromium.org,tvanderlippe@chromium.org
> 
> Change-Id: I70b7e10ddfac7eafa61599181f5103c84ace6a4d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1971410
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>

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

Change-Id: I33d08cf54dd0b414a6bc59703ee9dec238d31292
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1971415
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-17 10:41:08 +00:00
Simon Zünd 647f5e462f Revert "Let console asserts show up in the test results"
This reverts commit 1320cca621.

Reason for revert: Blocks the roll currently by causing layout
tests to fail on Mac OS:
https://ci.chromium.org/p/chromium/builders/try/mac-rel/262024

Failing layout test:
https://test-results.appspot.com/data/layout_results/mac-rel/262024/webkit_layout_tests%20%28retry%20shards%20with%20patch%29/layout-test-results/results.html

Original change's description:
> Let console asserts show up in the test results
> 
> Change-Id: I73c74000df80a1b46c31d35fd29c7fea0a9142bb
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962365
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

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

Change-Id: I70b7e10ddfac7eafa61599181f5103c84ace6a4d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1971410
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2019-12-17 08:44:58 +00:00
Tim van der Lippe 1320cca621 Let console asserts show up in the test results
Change-Id: I73c74000df80a1b46c31d35fd29c7fea0a9142bb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962365
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-16 16:28:37 +00:00
Connor Clark 37fc8b16fc Audits tests: dump settings in state
Change-Id: I9265c4d270ae1b95b4b0483ad54e853d434a4a35
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962536
Reviewed-by: Paul Irish <paulirish@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Connor Clark <cjamcl@chromium.org>
2019-12-12 22:53:46 +00:00
Connor Clark c4d8f8121c Audits: fix exporting as HTML.
This also adds a test.

Bug: 1033368
Change-Id: I33243c8df41f61e223b724716b14a805358afd2f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1963363
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
Commit-Queue: Connor Clark <cjamcl@chromium.org>
2019-12-12 22:36:16 +00:00
Jack Lynch 8a344769f6 Improve keyboard/screenreader experience in DOM breakpoints
Currently, there is no intuitive way to navigate the DOM breakpoints
pane by keyboard. This change refactors the DOM breakpoints pane to use
UI.ListControl to manage keyboard navigation, in response to feedback
here [3] about code duplication. Using ListControl also makes it easier
to manage an accessible description on breakpoint elements so that
screen reader users are informed about the checked state of breakpoints
and whether the page is currently paused on them.

Focusing the list items, before/after:
https://gyazo.com/5edc75de0c0e9d7f968f49e114cec324
https://gyazo.com/c3efc3322783f3505bc4dde3edabbf13

This CL breaks a web test, so [1] must be merged first to disable it.
[2] Fixes and reenables it.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1893960
[2] https://chromium-review.googlesource.com/c/chromium/src/+/1644461
[3] https://chromium-review.googlesource.com/c/chromium/src/+/1644461/14/third_party/blink/renderer/devtools/front_end/browser_debugger/DOMBreakpointsSidebarPane.js#141

Bug: 963183
Change-Id: I41e2e8b73baa7ae3e6169163785e245493ab4ba7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1889352
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
2019-12-12 03:34:36 +00:00
Connor Clark a0ccfd73da Audits: migrate webtests into the frontend repo
These tests expect a certain version of Lighthouse, and since the
lighthouse bundle lives in this repo so should these tests.

Bug: 1032845
Change-Id: I1062b14ed93d51f698282c2c93d1b2aee1aff208
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1895709
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
Commit-Queue: Connor Clark <cjamcl@chromium.org>
2019-12-11 18:57:45 +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
Yang Guo ce38cc10b0 Sync webtests with upstream
TBR=bmeurer@chromium.org

Change-Id: I149e182966867cdafa9f966af2ea4e93c015cffb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1958996
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-12-10 12:40:05 +00:00