Commit Graph
262 Commits
Author SHA1 Message Date
Johan Bay f2ac64a53a Add test for revealing assigned slot elements
Bug: none
Change-Id: I04c2b99d05c121b7b39733686b5b118ec8edc78a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3642136
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Johan Bay <jobay@chromium.org>
2022-05-11 15:50:55 +00:00
Wolfgang Beyer ecdb1c9323 Add sandboxed FileSystem to hosted mode (enables using local overrides)
Adding a sandboxed file system via `window.webkitRequestFileSystem` to
hosted mode enables using local overrides in hosted mode. Since e2e-
tests run in hosted mode, this enables adding e2e tests for local
overrides. This CL adds a first such e2e-test testing a simple response
header override.

Bug: 1313436
Change-Id: I6eb3e2ff9de336fa62648647fe48042009743d18
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3620364
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-05-10 15:03:01 +00:00
Wolfgang Beyer 6b3584f0da Update reporting API test
Deprecations are in the process of being refactored in the backend.
Switching the test to a different report type which I expect to be more
stable.

Fixed: 1321131
Change-Id: I20f9a4891bb482cc6006bdbf7a00c458f3a9ed3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3620360
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Maksim Sadym <sadym@chromium.org>
2022-05-02 13:44:55 +00:00
Jaroslav Sevcik 8e1a99324b Debugger: Show inline values at variable definitions
Bug: chromium:1316340
Change-Id: Ibe91a775103a05fd49370a92830dbd92b845001b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3586909
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
2022-04-27 08:53:38 +00:00
Dan Clark a3e8d3633d Restore ordering of pseudos in style pane
When trying to re-enable the test disabled in [1], I noticed that [2]
inadvertently changed the order in which highlight pseudos are listed
relative to other pseudos in the style pane.

This change restores the initial ordering, which is that ::before
pseudos are listed first followed by all other pseudos in
alphabetical order.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/3584106
[2] https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3603063

Bug: 1024156, 1164461
Change-Id: Ic2758995593da20739b58245a7d48243963fd18a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3608841
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2022-04-27 08:11:02 +00:00
Dan Clark 70ffb7f7bd Mark overridden rules for custom highlights
The change [1] added style pane support for indicating that highlight
rules are overridden in the highight cascade (showing them as
crossed-out). However, custom highlights were left out because custom
highlights of different names would otherwise be shown as overriding
each other, since all custom highlights were grouped into the same
cascade.

This change enables support for custom highlights by splitting
them up into separate cascades for each highlight name.

See [2] for a screenshot of this.

An alternative approach would be to change the inspector protocol
and the StyleResolver on the Blink side such that custom
highlights start out grouped by highlight name. However the
necessary style resolver changes look to be complex enough that
it's probably simpler (or at least not more complicated overall)
to arrange things on the DevTools side.

[1] https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3563627
[2] https://docs.google.com/document/d/1WHYEp6JfMjsAZLghCJa03HG5FEQEzRCi-naa5dmlQr4/edit?usp=sharing
Bug: 1024156, 1164461
Change-Id: Ib684889b347d9797b6f9c993fe6626053deb8c1a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3603063
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
2022-04-26 17:46:47 +00:00
Kim-Anh Tran 56b0b874e8 [e2e] Re-enable linear memory inspector test
Bug: 1169143
Change-Id: Id1c6c0b2a0705467c00b447ff5faffd433f0ae57
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598792
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-25 13:21:46 +00:00
Wolfgang Beyer c4b6220179 Un-flake issues-toolbar e2e tests
Fixed: 1317582
Change-Id: I78c4f04c9304137c7a2707ca8e30483a3d5d1e40
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3602505
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-04-25 05:39:36 +00:00
Dan Clark 621ed5035d Mark inherited and overridden rules for highlights
As a follow-up to [1], this change makes two updates for inherited
highlight pseudos:

- Draw a strikethrough through overridden styles.
- Don't grey-out non-inherited properties in the context of highlight
pseudos, since the highlight cascade treats all valid properties as if
they were inherited [2].

See [3] for screenshots of the change.

For now, custom highlights are not included in this change. Custom
highlights are currently grouped together into the same
`DOMInheritanceCascade` regardless of highlight name, so custom
highlight styles could be shown as overridden by styles from a
highlight with a different name. To fix this, custom highlights
would need to be divided into separate inheritance cascades.
This is nontrivial, so that work will be split up into a separate
change.

[1] https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3502175
[2] https://www.w3.org/TR/css-pseudo-4/#highlight-cascade
[3] https://docs.google.com/document/d/1hU-KL5-WIbTWSH46N7xaP8SBm69QAMiyg5jOY7ZHVTU/edit

Bug: 1024156
Change-Id: Ib32d862bba1ce1843b55d3e85f0e6e9f3a2447e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3563627
Reviewed-by: Delan Azabani <dazabani@igalia.com>
Reviewed-by: Johan Bay <jobay@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
2022-04-21 16:52:26 +00:00
Kim-Anh Tran f58a83ed9c Reland "Enable synchronization on instrumentation breakpoints"
This is a reland of commit 1b596f3b4b.

Changes:
1. Gated behind an experiment
2. Removed changes that are currently not used since it's gated
   (i.e. test changes)

Original change's description:
> Enable synchronization on instrumentation breakpoints
>
> This CL introduces the synchronization point for setting
> breakpoints on new scripts using instrumentation breakpoints.
>
> Instrumentation breakpoints will trigger at the first statement
> of a newly run script. Afterwards we wait for all resources
> that we need to set a breakpoint (if one is cached for that
> particular script), set it, and resume.
>
> Note: this will not correctly synchronize the case where we
> just opened DevTools or just created a new target, as at this
> point some scripts might have started running. For this, we
> need to synchronize the Debugger.enable call, which is something
> that is left to take care of.
>
> Bug: chromium:1229541, chromium:1133307, chromium:1300509
> Change-Id: I44e9b053a7cf64cc1f477a68ce9389cd92a1d05d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3470237
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>

Bug: chromium:1229541, chromium:1133307, chromium:1300509
Change-Id: I19553ddac9530fa3ccac6b245a3dd89da88c6d51
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3542248
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-04-21 07:43:46 +00:00
Benedikt Meurer 7e9e9d7442 [e2e] Improve and re-enable CSP Issues to Sources tests.
This depends on the Chromium fix in https://crrev.com/c/3594080, which
ensures that the back-end is not sending invalid scriptIds.

Fixed: chromium:1157427
Bug: chromium:1158782, chromium:1317608
Change-Id: I328ec4519057054b4511a5a1c70599503d2b3695
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3595980
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2022-04-20 12:27:35 +00:00
Mathias Bynens 79d72951b0 Fix and re-enable adorner toggling tests
Bug: chromium:1134593
Change-Id: Ieb2275461a180131a7e1b0a0f9701a1c33a4176e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3596239
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2022-04-20 10:42:29 +00:00
Benedikt Meurer ea843acfe0 [e2e] Remove bogus skipped test.
With https://crrev.com/c/2084583 we added a skipped test that was
supposed to pass after https://crbug.com/1003497 is fixed, but the
test is testing something different and is also wrong by itself.

Bug: 1003497
Change-Id: I46ba26f6a80a93f35936d54f23f00063d78e4a41
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3586905
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2022-04-16 20:10:32 +00:00
Wolfgang Beyer db408ddce8 Update container query e2e-test
Fixed: 1315119
Change-Id: I05ac0e9e2bf35e7d4e038a170487d4e066e69464
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3581760
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-11 09:22:58 +00:00
Ross A. Wollman 33f61e8c21 Add repro for stuck Service Worker pending request
The main request for a Service Worker scripts currently gets stuck in
the "(pending)" state.

This test will currently fail like:

```
1) network/network-datagrid_test.ts: The Network Tab
      shows the main service worker request as complete:

    AssertionError: expected { Object (status, time, ...) } to have property 'status' of '200OK', but got '(pending)'
    + expected - actual

    -(pending)
    +200OK
```

The issue appears to be rooted in the misalignment of network request ids
between the inial network CDP event for the request compared with
subsequent events.

Running this test with an executable built from https://chromium-review.googlesource.com/c/chromium/src/+/3544685
passes.

Bug: 1304795
Change-Id: I14f8d64d58fad16e4ddb0acf2058ed4c613c5500
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3566669
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-04-08 19:13:36 +00:00
Wolfgang Beyer b2af463419 Update tests to not use <link>-based APIs for Web Bundles
Support for <link>-based APIs has been removed in
https://crrev.com/c/3565580

Bug: 1314256
Change-Id: I4d3b716100b6ba723d2094d4e3fbc4be07e73ae3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3578718
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-08 13:59:26 +00:00
Danil Somsikov 0957e53050 Update test webbundle resources to use uuid-in-package instead of removed urn:uuid:
Bug: 1314256
Change-Id: Ife2c4c7e9ad6cac97eb80aef11ef8614512280b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3575950
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-07 17:09:25 +00:00
Philip Pfaffe 95bce20a24 Prevent making requests in the network request preview tab
When filling the iframe that's showing the preview for html requests, we
encode the html contents as a data-url and also set the sandbox property
on the frame. This avoids remaking the request from within devtools.
It's still possible for the iframe to spawn some requests. With this CL
we prevent requests by setting the csp for the iframe.

Bug: 833147
Change-Id: Id77321465c91fd68e5d6c6c3681e48b39cb32d14
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3557989
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2022-03-30 12:09:32 +00:00
Dan Clark bfe1683fe8 Display inherited highlight pseudo styles in style pane
The CSS highlight inheritance model specified at [1] introduces a
parallel cascade for highlight pseudos (::selection, ::spelling-error,
::grammar-error, and ::highlight). This change updates the style
pane to include this parallel pseudo cascade when displaying rules for
highlight pseudos.

The corresponding backend change is at [2].

A screenshot of what this looks like can be viewed at [3].

[1] https://drafts.csswg.org/css-pseudo-4/#highlight-cascade
[2] https://chromium-review.googlesource.com/c/chromium/src/+/3461424
[3] https://docs.google.com/document/d/10qOm--onzEQe6HT6z1kUqzAVOLkN7Rc42wnrahRdsr0/edit?usp=sharing

Bug: 1024156
Change-Id: I1c8a034d5d956acc6238a0965fd8dfdb92f2399b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3502175
Reviewed-by: Johan Bay <jobay@chromium.org>
Reviewed-by: Delan Azabani <dazabani@igalia.com>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
2022-03-22 16:13:31 +00:00
Benedikt Meurer b0555f75a7 [e2e] Simplify and unflake sourcemap code splitting test.
This simplifies the test added with https://crrev.com/c/2704585 to check
that breakpoints are set in multiple scripts correctly in the presence
of code splitting, by just loading the two scripts straight into the
page, which still catches regressions, but avoids the race between the
sourcemap parsing logic and the invocation of the function from the
second script.

Fixed: chromium:1272490
Bug: chromium:979000, chromium:1180794, chromium:1142705
Change-Id: I49f4973a12c7e350784d2495474eafec38b4424d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3529449
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Victor Porof <victorporof@chromium.org>
Commit-Queue: Victor Porof <victorporof@chromium.org>
2022-03-16 15:24:57 +00:00
Benedikt Meurer 5f3a22081f [debugger] Fix stepping at the end of a sourcemapped script.
Sourcemap entries don't contain end positions, but assume that they just
span until the next entry, which works fine, except for the last entry
in a sourcemap for which we don't know the end line/column. Previously
we put the pair Infinity:0 there, but the Infinity cannot be transfered
as `line` in a `ScriptPosition`, since the CDP has type int32 for this
field.

This changes the sentinel position to use the maximum signed 32-bit
integer for both end line and end column for the last sourcemap entry,
which is definitely outside any valid script and can safely be
transfered to V8.

Bug: chromium:1232347
Fixed: chromium:1305956
Change-Id: I7775b67d0d9c8a086bb65e08759e13e334754bcb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3522023
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
2022-03-14 19:03:25 +00:00
Benedikt Meurer 3d369648ae [popover] Fix hover preview for private fields.
The hover preview for private field accesses was broken if there was a
sourcemap, because it was removing the private id token from the
expression string. It was also broken in many cases for keyed property
accesses.

This refactors the tokenization logic to properly recognize (and
support) private id tokens, and to allow arbitrary text in between
'[' and ']' tokens, in particular things like `obj[x + 1]` will now
work correctly.

This adds a bunch of unit tests and also two e2e tests that check that
the popover preview works correctly in case of sourcemaps coming from
either TypeScript or Terser.

Fixed: chromium:1303407
Change-Id: I9ed76fe444af552e7e11ab7097d699b499fee395
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3513352
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
2022-03-14 07:48:23 +00:00
Kim-Anh Tran bbb5232d14 Revert "Enable synchronization on instrumentation breakpoints"
This reverts commit 1b596f3b4b.

Reason for revert: closed the tree, more blink tests to adapt

Original change's description:
> Enable synchronization on instrumentation breakpoints
>
> This CL introduces the synchronization point for setting
> breakpoints on new scripts using instrumentation breakpoints.
>
> Instrumentation breakpoints will trigger at the first statement
> of a newly run script. Afterwards we wait for all resources
> that we need to set a breakpoint (if one is cached for that
> particular script), set it, and resume.
>
> Note: this will not correctly synchronize the case where we
> just opened DevTools or just created a new target, as at this
> point some scripts might have started running. For this, we
> need to synchronize the Debugger.enable call, which is something
> that is left to take care of.
>
> Bug: chromium:1229541, chromium:1133307, chromium:1300509
> Change-Id: I44e9b053a7cf64cc1f477a68ce9389cd92a1d05d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3470237
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>

Bug: chromium:1229541, chromium:1133307, chromium:1300509
Change-Id: I9eccdf065820854746ec7ad4643362859c9960e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3506653
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Owners-Override: Kim-Anh Tran <kimanh@chromium.org>
2022-03-08 13:45:41 +00:00
Kim-Anh Tran 1b596f3b4b Enable synchronization on instrumentation breakpoints
This CL introduces the synchronization point for setting
breakpoints on new scripts using instrumentation breakpoints.

Instrumentation breakpoints will trigger at the first statement
of a newly run script. Afterwards we wait for all resources
that we need to set a breakpoint (if one is cached for that
particular script), set it, and resume.

Note: this will not correctly synchronize the case where we
just opened DevTools or just created a new target, as at this
point some scripts might have started running. For this, we
need to synchronize the Debugger.enable call, which is something
that is left to take care of.

Bug: chromium:1229541, chromium:1133307, chromium:1300509
Change-Id: I44e9b053a7cf64cc1f477a68ce9389cd92a1d05d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3470237
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-03-08 12:08:41 +00:00
Johan Bay 7dc121ed4e Update DevTools Chromium DEPS with container query syntax changes
Bug: none
Change-Id: Ibec567882c5ecbe2b3a4c7db5e10df99a5c413d5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3506573
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-03-08 09:20:50 +00:00
Johan Bay e573a564ca Fix naming of anonymous layers in layers widget
Bug: 1240596
Change-Id: I9bcf3d4cb84157208d1deb08221bf4b0598dc74c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3492520
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-03-01 11:42:28 +00:00
Johan Bay 52f5be82ff Add @layer support in styles sidebar pane
This CL provides support for @layer rules by providing two features:
1. we now separate the matched styles in the styles pane by their layer
to make it easier to see which layer each rule belongs.
2. we provide a layer overview widget that shows the layer tree for the
tree scope of the currently inspected element.

Screenshot: https://imgur.com/a/CxFrKyc

Doc: https://docs.google.com/document/d/1J7mvg-5eFsLhKLRkd7-mwdIxxDgt2fq1lhOTw47Df6E/edit?usp=sharing
Change-Id: I6fbffc7e272303e942af733029059a0a98771283
Bug: 1240596
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3484212
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2022-02-25 13:56:51 +00:00
Jaroslav Sevcik f336ccf23d Expression evaluation with sourcemaps (under flag)
This is a first step towards evaluating expressions with source map
resolution in the console.

This patch only replaces single variables expressions with the name
inferred from the source map. The feature is behind a flag because it is
still far from being usable (e.g., no support for more complex
expressions, auto-complete, partial expression evaluation, fallback UI,
etc.).

Bug: chromium:1297047
Change-Id: I5d4a233f65cf27112c370eeb81c509cd3e14623d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3461558
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
2022-02-16 08:01:52 +00:00
Danil Somsikov 19f1ef45e1 Add test cases from third_party/blink/web_tests/http/tests/devtools/network/network-filter{,-internals} to the third_party/devtools-frontend/src/test/e2e/network/network-filter_test.ts so that we can delete the former.
Bug: 1238279
Change-Id: I2cea6156e089f11a6414390dcb960f9cbc088a5a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3455494
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-02-14 14:22:48 +00:00
Kateryna Prokopenko 3671fa6556 Fix path encodings
Bug: 1253323
Change-Id: Iefa0517bb39d2f000f5abf1f184887325702c52a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3344916
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-02-14 08:10:56 +00:00
Simon Zünd 5eb6ab862e [sources] Add e2e test for setting breakpoints in live edited scripts
This CL adds a test where we:
  1) Edit a page script
  2) Set a breakpoint in the edited script
  3) Reload the page (this reverts the script)

Ideally the breakpoint moves in the reverted script in a smart way.
We have some infrastructure for that in place on the V8 side, but the
DevTools frontend does not account for it correctly.

Once the bug is fixed we can update the test expectations accordingly.
Rather than landing a skipped test, we expect the bugged state so we
get notified if the test starts breaking for unrelated reaons.

R=kimanh@chromium.org

Bug: 1216904
Change-Id: Ife4f4538b216c42888013363ef5e6cefb9b1392a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3447410
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-02-09 14:27:25 +00:00
Jaroslav Sevcik 9b67870615 Update scope variable name on source map change
This patch makes the scope chain pane listen to ithe source map attach
event so that it can update itself when a source map is added or
replaced.  This also fixes a race where scope variable names are not
updated if the source map is fully loaded only after the first
breakpoint is hit.

As part of this patch we also started tracking source maps in the scope
resolution cache so that we can ignore the cached scope if it was
computed against an old source map.

The E2E test here adds a source map to a script without a source map and
checks that the scopes view is eventually updated according to the
source map.

Bug: chromium:1294682
Change-Id: Ia2b091ebbc0d50520f0388f35b0d727821bce0d1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3439918
Auto-Submit: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-02-08 11:31:00 +00:00
Changhao Han 5c17e46caa Add @supports in the Styles pane
design doc: https://docs.google.com/document/d/1hrfrPwODSlYTNHf0buXUzL1FDv_Yw-Z7p21yvh4aBo0/edit#

Bug: 1222574, 1222573
Change-Id: Ife0aebb54f7ddba39d4019fc7b98fa84577488dc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3439985
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2022-02-04 14:13:40 +00:00
Yang Guo 94734947c4 Implement intuitive filter for console groups
Until now, console group titles were always shown despite filter.

Now, a console message is shown if:
 - its message content matches the filter
 - the title of the group (or parent group, grand-parent group, etc.
   matches the filter.

If a console message is shown, then the group it belongs to
(including parent group, grand-parent group, etc.) are also shown.


Fixed: 1068788
Change-Id: I04f280b185d183bd9992b9b65ef9a9d20da0a36f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3364094
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2022-01-03 15:38:16 +00:00
Yang Guo 5344c971e3 Fix skip range computation for step out case
R=bmeurer@chromium.org

Fixed: 1283188
Change-Id: I920484a07059b7448d39f8238ae78b73e7ecd330
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3360657
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2021-12-29 15:33:41 +00:00
Jaroslav Sevcik 6e877d5e1a Fix handling of relative source map paths for workers
We set the parent URL on child targets (such as workers) so that
sourceURL and sourceMappingURL are resolved relative to the
frame URL. We also add a test that checks that the source-mapped
file appears in the Source/Page pane.

Bug: chromium:1277002
Change-Id: I107b21d806420c98f39344bdf5902072fd398da0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3342111
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
2021-12-20 11:19:13 +00:00
Ari Chivukula 8ad687341f [Client Hint Issue] (3) Implement devtools issue {DEVTOOLS}
Now that third-party delegation via markup for client hints is in M99,
we need to start alerting developers where they use unsupported
features. These features will be expanded and extended as more client
hint features launch.
https://docs.google.com/document/d/1lDEvj8tMeuvUs1HTTqL-44YiI-7ljeQkusM_WhUfIeE/edit

This CL is a part of a series:
(1) Implement devtools issue {CHROMIUM}
(2) Update devtools protocol {DEVTOOLS}
(3) Implement devtools issue {DEVTOOLS}

Bug: 1219359
Change-Id: Ia8aaf05b98894fd32f5aad8f973fcdf774e1634c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3343149
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Rowan Merewood <merewood@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
2021-12-16 12:12:18 +00:00
Johan Bay 3968cbe1fc Roll Chromium and update tests for new CQ syntax
Change-Id: I6244ed4ab646ae4331adee5e6f7709eb5cb40215
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3317339
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2021-12-06 12:29:57 +00:00
Danil Somsikov 1afa110fd3 Ensure payload tab is selected when selecting different request
Bug: 1267891
Change-Id: I06883acc2cee6eec11b107a4c30c79f3ea9204e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3302736
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-11-26 11:04:31 +00:00
Danil Somsikov 1f80fc8cb7 Basic CHIPS support in the DevTools frontend
Bug: 1247957
Change-Id: I1b95fd672f7e2ff8133c05ee03d498ac75853bca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3291162
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-23 12:28:19 +00:00
Wolfgang Beyer a831b26b7e Display Reporting API endpoints
This CL adds content to the endpoints table in the Application panel's
Reporting API view. For each endpoint it shows the origin which
configured the endpoint, the endpoint name and the endpoint URL.

Bug: 1200732
Change-Id: Ie3b94bd81d85d7c6001fd38484434d989a32f9cf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3291155
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2021-11-23 10:26:50 +00:00
Jesper van den Ende 0113884bf6 Use mousedown event for activating network requests.
The click event only fires for elements that receive both a mousedown
and a mouseup event. Since DataGrid elements in the Network panel get
replaced every time a message is received on WebSockets, the click
event doesn't get fired if you click before a message and release after
the message. To fix this we'll listen for the mousedown event instead.
This has the added benefit that the request panel becomes visible
sooner, making it feel more responsive.

Fixed: 1222382
Change-Id: Ia44c47a90b4822530081caf63aec682e9f32186c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3293092
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-11-23 06:57:58 +00:00
Changhao Han e268747546 Allow CSS var jumping to unexpanded properties
Fixed: 1185788
Change-Id: Ife575b3618ae4aa03f7e4b7297ccff75d3f732c4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3291149
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Johan Bay <jobay@chromium.org>
2021-11-22 09:43:03 +00:00
Johan Bay 5741c98330 Add properties to accessibility tree nodes
Change-Id: I1c57c87d058dfd40d7274c169421d1993969de5a
Bug: 1226486
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3289780
Commit-Queue: Johan Bay <jobay@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2021-11-22 09:22:40 +00:00
ergunsh ee4a613851 Add keyboard shortcut for Replay XHR
Bug: chromium:1050021
Change-Id: I5566ae7de3b1b8f3b3ad3184d50f7f4220c2adc1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3251579
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2021-11-08 07:43:18 +00:00
Brandon Walderman 43094f2f75 Check UILocation when adding/removing breakpoint decorators
This change updates the DebuggerPlugin class's decorationByBreakpoint
map to key on both Breakpoint and UILocation when adding and removing
breakpoing decorators in the UI. Before this change, if a Breakpoint was
associated with multiple UILocations, then attempting to remove that
breakpoint would not update all of its decorators correctly. This is
because the first breakpointRemoved event that was received would
remove the Breakpoint entry from decorationByBreakpoint, and then any
subsequent breakpointRemoved events for the same Breakpoint with a
different UILocation would have no effect.

After the change, breakpoints with multiple UILocations and decorators
are updated correctly. An e2e test has been added to verify this.

Bug: 1251675
Change-Id: Ia33593af5a3efcb08cf219d2e21932406760f3fd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3205603
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Brandon Walderman <brwalder@microsoft.com>
2021-10-06 16:11:17 +00:00
Kateryna Prokopenko 7a84f0f42f Add view for GenericIssue
Bug: 1246855
Change-Id: I908eebfe1cadaa9fde7984262d89cfa7c51e43e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3190271
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2021-10-05 07:18:55 +00:00
Danil Somsikov 82873eeb1c Add option to hide CORS errors in console
Bug: 1251176
Change-Id: I321fc4864bbbb15bfd7ad46e5a1a7f7d066a0ebf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3175286
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-09-30 10:51:17 +00:00
Wolfgang Beyer 77b3f57b73 [ReportingApi] Display table of reports
Use the DataGrid component to display the Reporting API reports in a
table.

Screenshot: https://i.imgur.com/r1Xy6GP.png

Bug: 1205856
Change-Id: I48f08560028b10020dcc6973bbf83adc65b009a3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3194196
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2021-09-29 16:11:39 +00:00
Jaroslav Sevcik 33293f95a5 Reland "Improve stepping with source maps"
This reverts commit a09263601b.

This change did not cause the original breakage, so we are relanding
the original CL as is.

Original change's description:
> Improve stepping with source maps
>
> This aligns stepping through source maps with stepping through
> Wasm+Dwarf: when stepping from a location, we lookup the corresponding
> source location and then make sure we skip all the raw/compiled
> locations that correspond to that source location.
>
> To implement the skipping, we reuse the skipList mechanism that is
> already used for stepping through Wasm+Dwarf.
>
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093161

Bug: crbug.com/1232347
Change-Id: Ibe83e035aea73f070949902051dd8f100dde6f32
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3172834
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2021-09-22 07:37:24 +00:00