Commit Graph
1073 Commits
Author SHA1 Message Date
Philip Pfaffe b0d9425083 [test runner] Allow failing fetches
When a fetch or XHR fails an error is logged on the DevTools console.
The test runner fails when unexpected errors are printed. A failing
fetch or XHR is not actually an error though (https://crbug.com/124534),
so add the error message to the list of allowed errors.

Change-Id: I9c63ffdc86c590ff8471a3682cf90aa75b5a1ae8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601971
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-23 11:17:05 +00:00
Jan Scheffler 3ef0827109 [Recorder] Emulate network conditions
This patch adds support to emulate network conditions while recording.
The format looks like the following:
{
  // Simulated network throttling (Fast 3G)
  const client = await page.target().createCDPSession();
  await client.send('Network.enable');
  await client.send('Network.emulateNetworkConditions', {
    // Network connectivity is absent
    offline: false,
    // Download speed (bytes/s)
    downloadThroughput: 180000,
    // Upload speed (bytes/s)
    uploadThroughput: 84375,
    // Latency (ms)
    latency: 562.5,
  });
}

Bug: chromium:1156625
Change-Id: I6ca948d9e1333dfd478f95a526be7285374fd71e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601083
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-12-23 09:08:54 +00:00
Jan Scheffler c2ad98d783 Revert "Add header context menu to data grid"
This reverts commit 6bdb3622bd.

Reason for revert: Interaction tests started failing on mac.

https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/2514/overview

Original change's description:
> Add header context menu to data grid
>
> This CL adds a default header context menu to the data grid that lists visible
> and sortable columns much like the legacy data grid.
>
> Bug: 1150793
> Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

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

Change-Id: Ic8ef16044716d922d3a37b6a8fb32e13a75dee72
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1150793
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601962
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-12-23 07:27:30 +00:00
Jack Franklin 6bdb3622bd Add header context menu to data grid
This CL adds a default header context menu to the data grid that lists visible
and sortable columns much like the legacy data grid.

Bug: 1150793
Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-22 15:43:47 +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
Mathias Bynens 00e1aac922 Support forcing the CSS :target state
This patch extends the existing “force element state” UI to support
emulating the CSS :target pseudo-class.

Screenshot: https://i.imgur.com/oS5dLbi.png
Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/2575668
DevTools DEPS roll: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2586737

Bug: chromium:1156628
Change-Id: Id03f52b82336a602af91a259cd6bb5f53e877160
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581544
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-21 15:20:56 +00:00
Alfonso Castaño 8c42bf00df Make Issue Message in Source Tab link to Issues tab
Design-doc: https://docs.google.com/document/d/1TgMAUsruc_xAPAseG96H0-NHRT_PiXciedD58hgq1e4/
Bug: chromium:1150883
Change-Id: Ibe320de74ff726f5d649007e7c7b298a50892301
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562353
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-12-21 11:33:15 +00:00
Jan Scheffler e0603e1b86 [Recorder] Wait for elements
This patch adds a waitForSelector before all actions
that require an element to be loaded.

Bug: chromium:1153134
Change-Id: Ia6ef1c60d53d4392595a402c772e0c20cd31893d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581934
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-12-21 10:35:55 +00:00
Jack Franklin d034512dc4 Component docs can load test helpers
Most of the time we won't need this fully fledged environment, but for
some things (such as context menus, guess what I'm working on right now
:D) we do need a faked out environment to enable these features to run
when we run the component in isolation in the component docs.

Note: while this CL contains no component docs changes that take
advantage of it, I've tested locally with context menus in the data grid
and this change does work.

Fixed: 1148323
Change-Id: Ic8c508840a20b6d0f0e72fd7019a16271f04bea6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2597313
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-21 09:59:36 +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
Eric Leese d50ef8412b Disable flaky multi-workers tests
These tests are still very flaky.

Bug: 1157455
Change-Id: Iba29df43ca1c74be659fe6209639a49a1fa5525d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2597304
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2020-12-17 19:19:36 +00:00
Brandon Goddard 0b514ec563 Add basic Har importer unit test
This CL is a follow up to https://crrev.com/c/2594147 and adds
a basic unit test for the HAR importer to ensure that we do not
regress functionality in the future.

Bug: 1159439
Change-Id: I87c5226f4aab772e834100ba324566e38add3f8d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2596517
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-17 18:19:36 +00:00
Wolfgang Beyer 7df55c21d6 Show service workers in the Application Panel's frame tree
This CL adds service workers to the frame tree by listening to new
targets being added.

Screenshot: https://i.imgur.com/EAbI3d8.png
Bug: 1122507

Change-Id: I138430ea4db741ace4ff2e74f80e67ccb89640a6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2538837
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-12-17 15:59:46 +00:00
Sigurd Schneider 683143d8d5 Show an issue if a SAB is passed to postMessage
Back-end CL: https://crrev.com/c/2593087

Bug: chromium:1051466
Change-Id: Iaf0a5f4df879406bc098cc5215110709fb979205
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2593127
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-12-17 15:43:16 +00:00
Paul Lewis 25c49a45ff [unit test] Register missing events
A follow-up to https://crrev.com/c/2597301. The events need to be
registered otherwise they can't be fired. This CL registers missing
events for the MockConnection.

Change-Id: Icc530c0c9d8fd8ce61a231bbbabaed56d91a304c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2597305
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-17 15:38:26 +00:00
Paul Lewis 0096403e47 [unit test] Add support for mock events
In the MockConnection we currently support setting responses for
invoke_* calls being made. However, there are also events that targets
listen for. This CL adds support for invoking domain event listeners on
a given target.

Change-Id: I6880e0599f41000644f4dda1770e9c5ae219ba40
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2597301
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-12-17 13:05:55 +00:00
Wolfgang Beyer 3b535babbc Convert blocked time to milliseconds when exporting request to HAR
When building the timing information for HAR exports, the
NetworkRequest's startTime, issueTime and endTime are given in seconds,
whereas the values in the NetworkRequests's ResourceTiming property are
given in milliseconds. For HAR exports the former need to be converted
into ms because that is the unit HAR files require.

For the code path when there is no response received, this conversion to
ms has been missing previously.

Fixed: 1145177

Change-Id: I541d6dc636debdc84194381cf34fe8197b0d1d7e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2597296
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-12-17 11:44:15 +00:00
chait pinnamaneni 8a5112747f adding image and icon support for markdownview.ts
Markdown image example:
https://i.imgur.com/NDgsEA4.png

MarkdownImagesMap entries
```
[
  'settingIcon',
 {
  src: 'Images/settings-gear.svg',
  isIcon: true,
  width: '20px',
  height: '20px',
  color: 'var(--color-primary)'
 }
],
[
  'lighthouseLogo',
 {
  src: 'Images/lighthouse_logo.svg',
  isIcon: false,
 }
]
```

Markdown
```
Following is settings icon ![phone icon](settingIcon)
Image in markdown can be done like this ![alt title](lighthouseLogo)
```
Bug:1154783
Change-Id: Ia13e5d2c40de3c457429d7d550dbb326511873c1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2587634
Commit-Queue: Chait Pinnamaneni <cpinnamaneni@microsoft.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
2020-12-16 18:11:25 +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
Jan Scheffler cc9dea8e08 [Recorder] Clean up generated code
This cl will change the outputted script to use blocks for better
readability:
await page.mainFrame().childFrames()[0].click("aria/Button");

now, it will look like this:
{
  const target = page;
  const frame = target.mainFrame().childFrames()[0];
  await frame.click("aria/Button");
}

Bug: chromium:1153102, chromium:1154575
Change-Id: Ibd4b2157cd3b6762b8b6678b4a10ab328425075c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2564869
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-12-16 14:51:15 +00:00
Jack Franklin 15ab1a3fc7 [DataGrid]: test to ensure resize persists as data is added
I was wondering if this would work or not. Turns out it does (yay!) but
feels like the sort of thing that would be easy to break, so adding a
test for resizing, and then adding data, to ensure that adding data
doesn't reset the user's resize.

Change-Id: I0efb7def31119148e12e2c3decc726aaa8923425
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2593140
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-16 13:21:44 +00:00
Simon Zünd f261ffc197 Report Trust Token operation result in network panel
This CL adds the 'Results' portion of the Trust Token tab in the
Network panel.

Please note that the issuer and top-level origin are reported by
the result event due to the way the backend is implemented. The two
origins are considered part of the parameters though, and are
displayed in the 'Parameters' section for that reason.

Screenshots: https://imgur.com/a/XceM0Xl

R=petermueller@chromium.org

Bug: chromium:1126824
Change-Id: I23e6a5dcddb4be8ffbe95dc25bee75ffaedc2064
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2584968
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-12-16 12:51:14 +00:00
Jack Franklin c08ee98db5 Tests and fix for data grid resizing with hidden column
Whilst integrating the data-grid I found some bugs with resizing when there are
hidden columns. Some parts of the resize logic didn't take into account hidden
columns and as such indexes were off. This fixes it and adds more interaction
tests to cover the resizing functionality more thoroughly.

Fixed: 1158788
Change-Id: I302bd060bdc30e6739547b99b088541b5f36563e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2593134
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-12-15 17:00:48 +00:00
Maks Orlovich 41545839b3 Add ability to edit UA-CH for custom devices.
User-Agent Client Hints are an alternative to the UA String that's
more structured (no ad-hoc parsing!) and has better privacy control
(explicit control over which bits of more identifying information are
 sent).

Devtools has already supported emulating the sent client hints of the
bundled in devices; this also lets the user configure them for any new
custom devices they may add.

Screenshots:
current look, before any changes:
https://imgur.com/OHq1GMS

new, UA-CH section folded:
https://imgur.com/Eufp0VE

new section open and empty:
https://imgur.com/5uvxewJ

entering data:
https://imgur.com/ygIqS9z

all done:
https://imgur.com/5BH1Pse


Bug: 1073909
Change-Id: Id79e5eaae5d1f690d22635ca5f27566b982776b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2543693
Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-15 16:49:09 +00:00
Wolfgang Beyer a175e1f23c [Issues] Add UMA metrics for which types of issues are created
The issue code for the various issue types is aligned to follow a
similar schema (except for MixedContentIssues, where there is no
additional info to be embedded in the issue code).

Backend CL: https://crrev.com/c/2574985
Bug: 1072335

Change-Id: I6545297ce38f32f0e4af875c683beac931cdeafc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567967
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-15 09:25:17 +00:00
Jack Franklin 4747e2779d [DataGrid] allow columns to be resized by the mouse
Bug: 1153066
Change-Id: Ica1b2f23479b091182507a8629e8f2ccb6eea901
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560753
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-14 16:25:11 +00:00
Tim van der Lippe 406249fca5 Split up ESLint rules configurations in sub-folders
I have locally verified that adding an `it.only` in our test
suite correctly fails the ESLint process.

R=jacktfranklin@chromium.org

Fixed: 1158382
Change-Id: Id9b267e2b814f1d5ea85ff46d325d2a91030b2a2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2587745
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-14 15:42:36 +00:00
Patrick Brosset 55ec66e9ab [Flex] Adding gap support to the flex overlay
Flexbox now also supports *gap properties like css grid.

When gap is added in the main direction (using gap, column-gap in
horizontal writing-mode, or row-gap in vertical writing-mode), then
space is added in between items (on a flex line), where justify-content
space normally exists. Both justify-content and gap spaces work together
to space items apart.

When gap is added in the cross direction (using gap, row-gap in
horizontal writing-mode or column-gap in vertical writing-mode), then
space is added in between flex lines, where align-content space normally
exists. Both align-content and gap spaces work together to space lines
apart.

In the tools, we have 2 main use cases:
- Either draw all empty space at once, with the same style. This happens
with the inspect element mode for example. In this case, we draw the
entire empty area at once, to make the pattern look nice.
- Or draw either of the 4 types of empty spaces. This happens on hover
in the Styles pane, when hovering over align-content, justify-content or
a gap property. In this case, we want to draw just 1 type of space
without the rest.

The first use case is simple as we can draw in one go and just skip the
areas where flex items are.

The second use case made the code a little more complicated.
If drawing the justify-content space, then we need to draw the space on
each flex line, skipping where items are, and also skipping where gaps
are, if any.
Similarly, for align-content, we need to draw the space between flex
lines, but skip where gaps are, if any.

Screenshot of the 4 types of spaces: https://imgur.com/zMVTHyI.png
Backend CL: https://chromium-review.googlesource.com/c/chromium/src/+/2582260/

Bug: 1150832
Change-Id: Iefc9dfd037d12e10d4f3905e54da6d105593ef34
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2579039
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-12-14 14:19:46 +00:00
Simon Zünd 5b28634620 Handle Trust Token done event arriving before requestWillBeSent
Should a Trust Token operation fail or succeed before we fire the
`requestWillBeSent` event, then the Trust Token done event is lost
as the corresponding NetworkRequest instance has not yet been
created.

This CL introduces a new Map, that acts as a cache for such instances.
The Map records early events and `requestWillBeSent` considers
the Map when building the NetworkRequest.

R=sigurds@chromium.org

Bug: chromium:1126824
Change-Id: I7e6b6e7cdd0d6cc893b2ab45e6ef0948d0d55bbb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2584967
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-12-14 11:24:26 +00:00
chait pinnamaneni b316d12a68 adding link support for markdownview
Bug:1154783
Change-Id: Id87ae9da3ce1a705397af00ffd52a21175795286
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2580852
Commit-Queue: Chait Pinnamaneni <cpinnamaneni@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-11 19:59:27 +00:00
Tim van der Lippe 9314413aa3 Improve formatting for CSS variable definitions
CSS variable definitions are tokenized as "variable-2" by
CodeMirror. We should treat these as if they would be regular
CSS property definitions, to properly add new lines when
formatting multiple CSS variable definitions.

R=aerotwist@chromium.org

Also-By: stsoiasue@gmail.com
Fixed: 1024752
Change-Id: Ifd3d0c89f3cc10a718a14fc2b2c7bf11e66c717d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2578938
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-11 16:41:47 +00:00
Maks Orlovich 15dbbd0d67 Add a utility for structured header handling (3/3)
This is a prerequisite for support for custom UA-CH in device emulation;
and will be used to convert between text and internal representations.

This portion includes the serialization algorithm plus its tests

Bug: 1073909
Change-Id: I96bd2456aaa1d0fd62085ff32572e0ab17d1bc2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2578212
Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-11 16:35:57 +00:00
Alfonso Castaño f74238620c [Backend] Show Issue next to corresponding line in Source Tab
This CL contains the backend changes, the UI changes are in a followup CL.

UI CL: https://chromium-review.googlesource.com/c/2567969
Design-doc: https://docs.google.com/document/d/1TgMAUsruc_xAPAseG96H0-NHRT_PiXciedD58hgq1e4/
Screenshot: https://i.imgur.com/2iOUMqK.png
Bug: chromium:1150883
Change-Id: If252699ea6b6e33f0608bb824c00dbb9f4aacb73
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2558298
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-12-11 12:14:17 +00:00
Peter Marshall addd0c1458 [surveys] Fix minor issues with survey links
Use an actual button instead of a link pretending to be a button. This
gives us Space + Enter functionality for the onClick handler for free,
and avoids the need for aria-role.

Change the focus styles so that we only get a focus outline when the
link is used with the keyboard, to avoid an outline on click.

Bug: 1112738
Change-Id: Ic9309ce95576c1fa8bd54220fdd8d1ca744bf804
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2584974
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-11 11:59:37 +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
Alfonso Castaño 3a28946876 [Frontend] Show Issue next to corresponding line in Source Tab
This CL contains the changes related with displaying the messages.

Design-doc: https://docs.google.com/document/d/1TgMAUsruc_xAPAseG96H0-NHRT_PiXciedD58hgq1e4/
Screenshot: https://i.imgur.com/2iOUMqK.png
Bug: chromium:1150883
Change-Id: I1ec91ead2d102e397b5d0f18f9f96c10f91230ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567969
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-12-11 11:19:27 +00:00
Jack Franklin d37a14b73b Migrate string-utilities.js to TypeScript
Bug: 1050549
Change-Id: I24e781f4f3377c87b342947a83547687fad56f36
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2584263
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-11 10:37:07 +00:00
Eric Leese 41b47a308a Fix test flakes in multi-workers and issues tab tests
- Issues tab test now works on Mac and Linux but not Windows
 - Made Multi-workers test robust to condition where sometimes
 original and compiled source are loaded. Spun off a separate
 bug to address this.

Fixed: 1073406
Bug: 1073406, 1157455, 1157427
Change-Id: I3182bd5ac2f3bcdb903632ee68db7cc462622c3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2578939
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2020-12-10 17:11:56 +00:00
Maks Orlovich 646af63a0e Add a utility for structured header handling (2/3)
This is a prerequisite for support for custom UA-CH in device emulation;
and will be used to convert between text and internal representations.

This portion includes the list parsing algorithm + its tests.

Bug: 1073909

Change-Id: I9c86e9338594e19adc3a27883d3e217d75bffadb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2578211
Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-10 16:56:54 +00:00
Tim van der Lippe c8dc38a7d6 Move worker integration into entrypoint for heap_snapshot_worker
This allows us to import the heap_snapshot_worker bundle in the
unit tests, to start computing coverage for it.

R=jacktfranklin@chromium.org

Bug: 1009443
Change-Id: I5f1456c8c28679da3e259b2da8c3e0386af5e38d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581926
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-10 10:02:48 +00:00
Tim van der Lippe 7be568a682 Use FormatterWorker.format in unittests
This cleanups up a bit of code related to constructing the
formatters input. By using the FormatterWorker.format function,
we also more closely mimic what the actual worker does.

R=jacktfranklin@chromium.org

Change-Id: I5b7b384cbf46df23e98d8843fb868b0db6a7016d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581921
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-10 09:41:08 +00:00
Tim van der Lippe 53c2ae23b7 Add tests for javascript_metadata
R=jacktfranklin@chromium.org

Bug: 1009443
Change-Id: I03f0a2c5bf0aed628b6097d419586d8ad07a9f3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581924
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-09 17:06:26 +00:00
Tim van der Lippe 40440d9840 Add tests for HTMLFormatter
R=jacktfranklin@chromium.org

Bug: 1024752
Change-Id: I92dedd0efd1d3ca1574b21eecd13eef6cc8126bb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581919
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-09 16:47:27 +00:00
Philip Pfaffe 7e36e27564 [Wasm debug] Add a new plugin method to retrieve breakable lines
With this CL we can check in language-plugin mapped source files which
lines are actually mappable akin to sourcemaps. With this, we prevent
setting breakpoints on un-mapped lines and avoid lots of unpredictable
breakpoint sliding.

Fixed: chromium:1156075
Change-Id: I8b21b998727a0d4f964430949b7c6ddcd0896d57
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581549
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-12-09 16:10:36 +00:00
Maks Orlovich 4d873174c4 Add a utility for structured header handling (1/3)
This is a prerequisite for support for custom UA-CH in device emulation;
and will be used to convert between text and internal representations.

This portion includes the item parsing algorithm + its tests.

Bug: 1073909
Change-Id: I196a4fda0790ff6f62e0ca97a79cb75f7c7acb99
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2571441
Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-09 14:55:56 +00:00
Tim van der Lippe ec534b82b6 Add CSSFormatter tests
This ports the http/tests/devtools/sources/pretty-print-css-*.js
to Karma. Note that the expected output is the current output.
In a follow-up CL I will attempt to improve the formatting.

R=aerotwist@chromium.org

Bug: 1024752
Change-Id: Icbddd18ea7ef15ec97ad3ea70cb92a08e909a1f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2577572
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-09 14:01:16 +00:00
Alex Rudenko 34e5f31b2c Click on a tree element to make sure the element is focused
It appears that the test if flaky because the element is not getting
focused depending on the startup time of DevTools. As a wordaround,
we click at the selected tree element to make sure it will receive
keyboard events.

Change-Id: Ia400846bacfbf39967b15a69faf7c2db883ddb3b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2579918
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-12-09 13:12:26 +00:00
Michael Liao 07a11ed089 [Telemetry]: Adding CSS Editor Opened telemetry
This CL adds telemetry for CSS editor openings.  The telemetry event triggers when a user clicks on a swatch or the font editor button.  The different CSS editors pass in a different ID to differentiate the telemetry events from different swatches/buttons.

chromium/src change: https://chromium-review.googlesource.com/c/chromium/src/+/2410650

Bug: 1149589
Change-Id: I7309591c6fc6ea6524f43a6e3924278446fcf194
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2410431
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Songtao Xia <soxia@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2020-12-08 15:27:43 +00:00
Kim-Anh Tran 0f9bf8aa6b [e2e] Re-enable wasm scope test
This updates the test after a change in the v8 backend that
changes the scope view for Wasm.

Bug: chromium:1156555
Change-Id: I6c3c6d21ea9829ea9276e5a57681e52ad82c61b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2577575
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-12-08 14:32:42 +00:00
Jack Franklin ec064415e7 Fix network category filter being reset if text filter is persisted
This fixes a bug where if the user filters the network panel for the
text "foo", and filters by resource type (e.g. to "XHR"), when they
close and re-open DevTools the search text "foo" is persisted and added
back, but as a side-effect the resource type filter is lost.

I discovered this is true for all the additional filters; the moment you
restore a text filter every other setting is lost. To fix this we avoid
calling the `setTextFilterValue` function, which resets everything else,
and instead set the value of the filter input directly, with no other
side-effects.

Fixed: 1155564
Change-Id: I9fa1db634e9e5ec71e84b220c66503a4ab3e4be5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2577574
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-12-08 13:48:02 +00:00