Commit Graph
261 Commits
Author SHA1 Message Date
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
Kim-Anh Tran e805dda363 [e2e] Re-enable source map test
This increases the timeout for the source map tests.

Fixed: 1321567
Change-Id: I7871b049bf7ad76f953e9b5205510c81f4d412e5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3627770
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-05-05 19:13:01 +00:00
Andres Olivares f7adffea54 Disable flaky sources tab e2e test on all platforms
This test has failed recently on other platforms too:

Win:
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8815243057646828849/+/u/E2E_tests/stdout

Linux:
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8815218728513982881/+/u/E2E_tests/stdout

Bug: 1321898
Change-Id: I839e665f22113a6088842ba40537239bb3466883
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3627737
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Andres Olivares <andoli@chromium.org>
2022-05-04 17:17:30 +00:00
Benedikt Meurer 4cf9a8553f [e2e] Fix flakiness due to not waiting for Call Stack to update.
Fixed: 1321707
Change-Id: Ib56cdbe889d07e148bceacc4a86f8b1abee0273e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3627329
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2022-05-04 07:18:40 +00:00
Jack Franklin e839c0cf22 Enable long import wrapping for JS imports
DISABLE_THIRD_PARTY_CHECK=big clang format run against all files in
front_end and test/

Bug: 1319340
Change-Id: I1fff63cb07544ccd0e3059fc901f9a48ff4af13b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598879
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2022-05-03 10:22:12 +00:00
Andres Olivares ecf2a202fa Skip sources/debug-raw-wasm_test.ts e2e test on mac
Due to flakiness:

https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8815454634348273553/+/u/E2E_tests/stdout

https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8815545078168639505/+/u/E2E_tests/stdout

https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8815615465522346625/+/u/E2E_tests/stdout

Bug: 1321898
Change-Id: Ia3e1be42e6011f96894ed0ecbf80cac7c41dac3b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3621877
Auto-Submit: Andres Olivares <andoli@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2022-05-03 06:59:14 +00:00
Andres Olivares ad001b2af4 Skip sources/can-break-with-wasm-sourcemaps_test.ts on mac
The test has been flaky recently on the Mac bot:

https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8815641271312814129/+/u/E2E_tests/stdout

https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8815532227356031937/+/u/E2E_tests/stdout

Disabling it for now

Bug: 1321707
Change-Id: I16b9cda9b8ad7d36a22a388494b70d6bd58198df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3621874
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Andres Olivares <andoli@chromium.org>
2022-05-03 05:38:38 +00:00
Andres Olivares dea2959218 Skip flaky source map e2e test on windows
Bug:1321567
Change-Id: I8bdfe4ea22eb7ceea928be4b154ce337d38bc7ea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3620536
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2022-05-02 13:27:55 +00:00
Ergün Erdoğmuş 029ac9db0b Add shortcuts for toggling debugger and navigator sidebars in Sources panel
Renamed `DebuggingActionDelegate` to `ActionDelegate` for SourcesPanel
since all the actions there acts on the panel itself
and with the introduction of these two actions,
they are not only related to debugging anymore

Fixed: 1226363
Change-Id: I0c472f4f2ffcdb78ea6824771f9540882550984c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3392021
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
2022-04-27 15:02:11 +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
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
Kim-Anh Tran 179ef7b21c [e2e] Increase timeout for instrumentation breakpoint tests
Tests are slow and timeout on windows and mac. Increase
the timeout for these tests.

Bug: none
Change-Id: Id4af32e23c7197e331464997b885bc37e60e12c4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598882
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2022-04-22 07:57:22 +00:00
Andres Olivares 4f41399291 Tentatively re enable can-format-sourcecode_test.ts e2e test
Fixed: 1184104
Change-Id: Iea3c15df97365ee08100759ebbeb573a3ea4d32d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3600058
Auto-Submit: Andres Olivares <andoli@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-04-22 06:05:07 +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 c480d4f9c8 [e2e] Fix and re-enable WebAssembly stepping tests.
The underlying cause of the test failures has been addressed by
breakpoint fixes.

Bug: chromium:1134120
Fixed: chromium:1177714
Change-Id: I5aab475834101c39d229b50a9daa76b3fa295a0c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3595986
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-04-20 13:07:45 +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
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
Benedikt Meurer 21fdc5bcd9 [e2e] Fix and re-enable Wasm sourcemap breakpoints test.
Fixed: 1252330
Change-Id: I3c454767f2304095681609714c3de392218eb131
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3586908
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-14 13:08:22 +00:00
Benedikt Meurer 34769c9ed2 [e2e] Fix and reenable Multi-Workers test cases.
This refactors the test cases to avoid racing with the Revealer in the
devtools-frontend by explicitly opening the desired files ahead of time
and only checking that DevTools doesn't reveal a second copy of the
file.

Drive-by-fix: Also fix the checking for hitting the correct breakpoint
by aligning the testing logic here with how it's done in other places
(the old CodeMirror execution line detection no longer works anyways).

Bug: 670180
Fixed: 1157455
Change-Id: I382a7956bef66df53d3fb95571cb31cc086d9105
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3581032
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2022-04-13 13:25:20 +00:00
Benedikt Meurer 7b0984e730 [e2e] Make Wasm debugging tests more robust.
Following up on https://crrev.com/c/3574665, this ensures that our e2e
tests don't rely on certain reload behaviors while stopped on a
breakpoint, but instead explicitly resume execution.

Fixed: 1314707
Bug: 1004038, 1014415, 1112863, 1134899
Change-Id: I115dd310c237bef9bec8a476489def17ef96d8a5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3584112
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-13 13:05:20 +00:00
Wolfgang Beyer b09e9861f2 Disable tests to unblock updating Chromium dependency
Bug: 1314707
Change-Id: Ib694b53f1ae42175c6636b41ca793166bc1d4c61
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3579261
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-08 13:33:36 +00:00
Kim-Anh Tran ead38e4090 [e2e] Only overwrite timeout if not supposed to be infinite
This changes a timeout use in script-in-multiple-workers_test.ts.

Bug: none
Change-Id: I911acacf9a6562ea964ebfc2b5352b35e8778728
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3560419
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2022-03-30 12:15:49 +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
Jaroslav Sevcik 97a93b6671 Substitution of minified identifiers in expressions
Without this patch, we only substituted single identifiers. With
the patch, we substitute in arbitrary expressions. (Still only
as an experiment.)

Bug: chromium:1297047
Change-Id: Ifae5cab1a42823559751fbd9dc515edfae02255e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3487866
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
2022-03-09 09:13:21 +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
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
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 3f4db25359 [e2e] Minor cleanup to make e2e test more robust
This is a follow-up to a review suggestion in
https://crrev.com/c/3447410.

R=jarin@chromium.org

Bug: None
Change-Id: I4499c082130f14e4298b1f81cdaca07be5fa94be
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3447415
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-02-10 15:06:21 +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
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
Takuto Ikuta 9013329736 e2e: remove strange space from source
This is to fix following build error from esbuild.
```
✘ [ERROR] Unexpected "\u200b"

    ../../third_party/devtools-frontend/src/test/e2e/sources/can-format-sourcecode_test.ts:62:6:
      62 │        '',
         ╵       ~

```

This is come from
https://chromium.googlesource.com/devtools/devtools-frontend/+/c1ab112d9002d5c3b3bb70cf2839bac182f0cdb5%5E%21/test/e2e/sources/can-format-sourcecode_test.ts
but is it intentional?

Bug: chromium:1278663
Change-Id: Ib30878a1e3146b736cf088b6a550f3c162e2a4f3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3330075
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
2021-12-10 13:22:59 +00:00
Victor Porof 59e9814a66 Disable source map test for being flaky
Signed-off-by: Victor Porof <victorporof@chromium.org>
Change-Id: Iaec203260298d06e68ada360019af5adae87a90a
Bug: 1272490
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3295535
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-22 15:46:48 +00:00
Tim van der Lippe c1ab112d90 Port the sources panels to CM6
R=tvanderlippe@chromium.org

Bug: 1241848
Change-Id: Idfe1658c9c2948b5c79c2845b9fd9472746a62b9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3247435
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-12 16:47:28 +00:00
Kim-Anh Tran af36f0d83e Do not act on forwarded resume action
Previously we would forward F8 events on the target page
to the SourcesPanel. This would trigger two separate resume actions,
one in the inspector overlay, and one in DevTools front-end. The
forwarding is still required, as we are tracking the user metrics.

This adds a check to the SourcesPanel to only act on the resume,
if it's not coming from the forwarding, and if the overlay is enabled.

Fixed: chromium:937130
Change-Id: I17bebd95b53d9c8e802a5b2a0320e7b4225f144d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3220152
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-10-14 10:06:24 +00:00
Benedikt Meurer 833c95fce0 [e2e] Re-enable sourcemap code splitting test.
Fixed: chromium:1218732
Bug: chromium:979000, chromium:1180794, chromium:1142705
Change-Id: Id09f642a9807647ba0d4fa9bf63f63986804865d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3220737
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2021-10-13 12:38:02 +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
Benedikt Meurer 20de1e3e2b [cleanup] Remove the 'Empty sourcemap auto-stepping' experiment.
With https://crrev.com/c/3172834 we previously aligned the stepping
behavior of sourcemaps (both JavaScript and WebAssembly) with that
of DWARF (WebAssembly only), but we still gated that adjustment
behind the 'Empty sourcemap auto-stepping' experiment.

This enables the aligned behavior by default and removes the (confusing)
and according to usage metrics almost completely unused experiment.

Bug: chromium:1232347
Change-Id: Idfa62a2cfa337d4ced3486baa3249cb95a8d8c16
Fixed: chromium:1018234
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3197720
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@google.com>
2021-10-01 17:56:31 +00:00
Wolfgang Beyer 36bccf17ba Disable flaky wasm test.
https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/7804/overview
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8835316218506274641/+/u/E2E_tests/stdout

Bug: 1252330
Change-Id: Idbafecad37404d8e6a68c6164d020412139ea3d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3178861
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-09-23 11:52:52 +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
Philip Pfaffe 4fad73630b Move language extension test to test/extension and use new API
Bug: none
Change-Id: I3fe43fa9c2e4a2171f622d1a70f15ca0a5f9d6ac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3145220
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-09-14 09:13:30 +00:00
Ella Ge a09263601b Revert "Improve stepping with source maps"
This reverts commit 37810de6de.

Reason for revert: Suspect causing test failures: crbug/1244616

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.
>
> Bug: crbug.com/1232347
> Change-Id: Ib19695b2078256282189df5b10d9165633849799
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093161
> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>

Bug: crbug.com/1232347 crbug.com/1244616
Change-Id: Ie38ae7e603dff7d951c79b8c590ed27d31023c0a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3128964
Auto-Submit: Ella Ge <eirage@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-08-30 15:54:25 +00:00
Jaroslav Sevcik 37810de6de 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.

Bug: crbug.com/1232347
Change-Id: Ib19695b2078256282189df5b10d9165633849799
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093161
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2021-08-30 11:29:04 +00:00
Benedikt Meurer 60f6292764 [test][e2e] Rebaseline for ECMAScript accessors in previews.
This rebaselines the test expectations for the DevTools front-end after
https://crrev.com/c/3070701 landed in V8, and reenables the relevant
tests.

Fixed: chromium:1238221
Bug: chromium:1076820, chromium:1199247
Change-Id: I986185cad30912745f07a5b637d294402fb3bfaa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3087347
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-08-11 09:01:36 +00:00
Alex Rudenko a041215e73 Disable tests blocking Chromium roll
Bug: chromium:1238221
Change-Id: Icc700b9cf140204a9d5bef7dfcc17c1952c2a2ed
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3083704
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-08-10 06:19:29 +00:00
Jan Scheffler a033b2934c [Underscore Migration] Migrate models/extensions
This patch is part of the underscore migration that adds the private
keyword to all properties that start with an underscore and removes the
underscore.

Bug:chromium:1207342
Change-Id: I775d7c5311fe4d1d0705d7358573242ded5083f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3077892
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-07 13:25:04 +00:00