Commit Graph
22 Commits
Author SHA1 Message Date
Andres Olivares 2d54e4a35d Disable flaky breakpoint e2e test on other windows
This test was disabled on mac only, however it has failed recently on
on win too:

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

Bug: 1321713
Change-Id: Iaf6f095b0888a93b5b28892bd18caf43ed7599f7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3627736
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Auto-Submit: Andres Olivares <andoli@chromium.org>
2022-05-04 22:30:40 +00:00
Andres Olivares 5aa9a8541a Deflake snippets e2e tests
These tests were reenabled recently in a deflake attempt at https://crrev.com/c/3596912. However, the tests remained flaky on the mac_relase bot. This is another attempt to deflake it. I ran 100 successful consecutive execs of each test with this CL's fix applied in the mac_release bot at https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8815139412446297793/+/u/E2E_tests/stdout, so it is with greater confidence that it's deflaked this time

Bug: 1198160
Change-Id: Ib2d64de93a242cfa3caddae2b749ef50a35d2497
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3621873
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Andres Olivares <andoli@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2022-05-04 09:51:02 +00:00
Andres Olivares 5727d1f24d Skip snippets/breakpoint_test.ts e2e test on Mac
The test has been flaky on the bots:

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

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

Disabling for now.

Bug: 1321713
Change-Id: I6d54c88b7b9d86465c3b69b7e174345954bd82fe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3621875
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Auto-Submit: Andres Olivares <andoli@chromium.org>
2022-05-03 15:14:58 +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
Danil Somsikov e245206485 Fix flakiness when reading console message in e2e tests
Bug: none
Change-Id: I757992648379ac824432e67ef863998cb0daf688
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3607832
Reviewed-by: Maksim Sadym <sadym@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
2022-04-27 08:29:38 +00:00
Andres Olivares 6c27d09a12 Deflake snippets e2e tests
Fixed: 1198160
Change-Id: I59a1b15ccd649b822c17d28887f3797535e0a406
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3596912
Auto-Submit: Andres Olivares <andoli@chromium.org>
Reviewed-by: Victor Porof <victorporof@chromium.org>
Commit-Queue: Victor Porof <victorporof@chromium.org>
2022-04-25 20:58:11 +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 3fe249350b Show error decorations in editor when snippets throw errors
Snippets have an interesting relationship with UISourceCode. Snippets
are loaded and stored in a "filesystem" project, and have, as such, a
corresponding UISourceCode. When snippets are evaluated however,
DevTools treats them as "normal" page scripts and creates a second
UISourceCode in the "network" project of the main target.

The AutoMapping class is aware of the two snippet UISourceCodes and
connects them together the same way we handle workspaces (where
developers can add a local directory and have it mapped to a pages
resources).

When this mapping happens, the UISourceCodeFrame that displays the
snippet switches modes. UISourceCodeFrame has two modes: It can display
a single UISourceCode, or it can display such a filesystem <-> network
mapped pair of UISourceCodes (aka PersistenceBinding). The bug which
this CL fixes occurs during this switch.

Each UISourceCode has a list of messages attached that serve as the
basis for decorations in the editor. Previously, when the switch from
single UISourceCode to PersistenceBinding happened,
the UISourceCodeFrame would ignore the messages stored on the
newly bound network UISourceCode. It would keep showing the messages
from the filesystem UISourceCode. This CL fixes this by resetting
the rendered decorations to the union of both message sets.

Fixed: 1277403
Change-Id: Ibffb86afcbd1c6a5a5c629a6f9b3b2dff73ab9ed
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3412774
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-01-28 13:16:39 +00:00
Marijn Haverbeke 3ea8755408 Remove machinery surrounding CodeMirror 5
The third_party module is still there because a few of its scripts are
used for tokenizing.

R=tvanderlippe@chromium.org

Bug: 1241848
Change-Id: I576b7c1a0fb6c78ca83422fdb9117f169a75efb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3295489
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-29 15:10:46 +00:00
Andres Olivares c860fe1985 Introduce describe.skipOnPlatforms mocha extension
NOPRESUBMIT=true
Bug: none
Change-Id: If0e96e43aa13a2fa557a075975c2e7f365db930a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3258130
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-11-03 20:44:06 +00:00
Wolfgang Beyer ec3a1952c4 Skip flaky tests
Bots failing, e.g.
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8850151541602739248/+/u/E2E_tests/stdout

TBR: andoli@chromium.org
Bug:  1198160
Change-Id: Id5eaf060f8592b5ade768b2f106137159864a90c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2821872
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2021-04-12 16:00:53 +00:00
Andres Olivares a92e9ccd93 Adds e2e tests for expression evaluation in sources editor
This adds test cases for the 'Add selected text to watches' and
'Evaluate selected text in console' actions triggered via key shortcuts
in the sources panel code editor.

Also, the file 'context_menu_test.ts' is renamed to 'snippets_test.ts'
according to the tests implemented in there.

Bug: 1177004
Change-Id: I2adb0366c215cfd3f1fe9d099e3bee088381dded
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2809754
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2021-04-09 16:32:13 +00:00
Tim van der Lippe f8a851ceac Fix snippets flaky e2e test
This should hopefully make sure that we can always find the selector.

R=petermarshall@chromium.org

Fixed: 1111255
Change-Id: I2a69c3a561f15e0e6f72c87fd454c69f7ed76a58
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2367948
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-08-24 07:59:47 +00:00
Peter Marshall 467b0b1632 tests: Use mocha-extensions in e2e tests
The extensions have helpers like it.repeat() and async tracing which
make development and debugging easier. All the tests will import from
the extensions file now rather than mocha directly.

A follow-up CL will add lint checks for this.

Bug: 1101782
Change-Id: I7b1a540be1685375b06f1db5d0fda2f2879446c2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2354104
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-08-17 07:37:56 +00:00
Jan Scheffler 509eeef891 Disable flaky e2e test
Bug: 1111255
No-Try: true
Change-Id: Ic0d54c605b2c24628d024ac08425272dac28f1a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2328849
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-07-30 10:56:10 +00:00
Simon Zünd a292e76f9c Revert "Fix path escaping"
This reverts commit 10892e33a2.

Reason for revert: Breaks the web test http/tests/devtools/sources/debugger-breakpoints/nodejs-set-breakpoint.js
on the windows bot: https://ci.chromium.org/p/chromium/builders/try/win10_chromium_x64_rel_ng/620785?

Original change's description:
> Fix path escaping
> 
> Inconsistent URL escaping was breaking snippets, which by default
> have characters (space and #) which need to be escaped.
> 
> As a general rule, anything called 'url' or 'path' is now url-encoded,
> and anything called 'name' or 'platformPath' is not.
> 
> Bug: 1094436
> Change-Id: I7a26e9f2bfa676d0cc1b4731ea939ebc12222a25
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2266998
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>

TBR=sigurds@chromium.org,szuend@chromium.org,tvanderlippe@chromium.org,janscheffler@chromium.org,leese@chromium.org

Change-Id: I842706b3a5781f0ee767c1867d532f4c5d394543
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1094436
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2316073
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-07-23 19:22:31 +00:00
Eric Leese 10892e33a2 Fix path escaping
Inconsistent URL escaping was breaking snippets, which by default
have characters (space and #) which need to be escaped.

As a general rule, anything called 'url' or 'path' is now url-encoded,
and anything called 'name' or 'platformPath' is not.

Bug: 1094436
Change-Id: I7a26e9f2bfa676d0cc1b4731ea939ebc12222a25
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2266998
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-07-23 11:23:08 +00:00
Tim van der Lippe d76dbd1fe3 Add node_ts_library for Node scripts
ts_library by default uses ES modules. However, Node doesn't fully
support ES modules yet, nor do our dependencies for our e2e-tests
support them fully. Therefore, transpile to commonjs for now, if
running in Node.

DISABLE_THIRD_PARTY_CHECK=Fixes to ts_library
R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1088463
Change-Id: Ie6acf886417b80eb38365f9c2377799e370634fe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224805
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-02 10:24:00 +00:00
Tim van der Lippe 869374bcab Port shared test runner logic into separate package
The shared test runner logic was reimplementing parts of Mocha,
in particular the test logging and filtering. Moreover, it was
booting the hosted mode server and puppeteer outside of Mocha.

Mocha supports root level hooks [1]. These hooks allow us to
perform work before a test starts. Moreover, by using the
before and after hook, we can run logic before and after
all tests.

By using these hooks, we can extract the "boot the hosted mode
server and hookup puppeteer" part to these root hooks.
Additionally, we can reset the pages in the `beforeEach`, which
means that tests themselves don't have to reset the pages.

We also put the implementation code into third_party/conductor,
as we would like to reuse this logic for the Puppeteer tests.
The Puppeteer test suite now also uses Mocha and has very
similar requirements as to our DevTools tests. By extracting
from DevTools, we can look into expanding the test runner to
other usecases, but that is out of scope for now.

[1]: https://mochajs.org/#root-level-hooks

Bug: 1071369

Change-Id: Ie9f954359d9de84da564b74b6f5517dd535db008
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2150458
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-04-20 10:32:58 +00:00
Tim van der Lippe 77750704ab Rename e2e test files
This allows us to efficiently glob the files based on the
`*_test.js` pattern.

Bug: 1071369

R=aerotwist@chromium.org

Change-Id: I0ba1af79d66cc146deb2301c6d398da7cf0bcd02
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2151453
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-04-16 15:47:19 +00:00
Tim van der Lippe 18ab47bc33 Typecheck all e2e tests with TypeScript
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I2045f0980a522a3fb63e1881c2b968a2170ec57f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2112557
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-23 13:02:11 +00:00
Tim van der Lippe 046a8d3023 Fix command menu items for snippets
The runtime was throwing errors because `Snippets.SnippetsQuickOpen` did
not exist. The culprit is that the export statement still included a
`default class` rather than a `class`.

Also added an e2e-test that goes through the workflow of creating a
snippet and then verifying that the command menu shows these snippets
in its autocompletion.

R=aerotwist@chromium.org

Bug: 1060565
Change-Id: I9bb9d4ed34e5fda25cdd796a6a1e4c8a61f89958
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107222
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-17 15:23:18 +00:00