Commit Graph
46 Commits
Author SHA1 Message Date
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
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 6b62d60b95 Make Memory e2e test step through search results until wanted is found
This ensures that the test still works even if the ids (and thereby the
ordering) of the objects change.

Bug: none
Change-Id: Ia4980a3e5bb0b451d22a5f82717e921342675b11
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3506285
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-03-07 10:19:51 +00:00
Tim van der Lippe 2d9a95ce7b Suppress all existing promise races
To suppress the races, we mark these invocations with `void` per
the instructions of `no-floating-promises`. This explicitly marks
these statements as side-effect promises.

Engineers can later analyze these void statements and determine
whether the promise races are intentional or accidental.

R=jacktfranklin@chromium.org

Bug: 1239617
Change-Id: I6b7a24cf21029d6ff73b112b3e8255ebab8c60ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3366467
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-01-04 16:08:08 +00:00
Johan Bay f844b93c88 Skip memory test that causes failures on the tree
Bug: 1239550
Change-Id: Ie9dcea10505e892b34cc16e1bc2d1f59c192be32
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3318041
Commit-Queue: Johan Bay <jobay@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Johan Bay <jobay@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-12-07 08:12:12 +00:00
Jack Franklin d92dd9b045 Fix flakey memory tests
I know that upping the timeout isn't always the most reliable fix but in
this case locally I was able to replicate the failures until I upped the
timeout this high. The UI that these tests cover is slow and has a lot
of data involved so I'm not surprised that they take such a long time on
the bots.

Bug: 1239550
Change-Id: I62a8065e8d66da9190554cfec3a89a34790babf7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3099990
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-12-06 15:06:10 +00:00
Jack Franklin ac6b715250 Re-enable skipped test on Mac
It was disabled on Mac due to it flaking, but it was suspected it may
have been a problem with the Chromium roll. I'm now re-enabling it
having run it successfully 50+ times on my Mac with CPU throttling.

Bug: 1256710
Change-Id: I1caa858e1f301fdae313b5595b80760973d0810b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3301385
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-11-29 09:02:16 +00:00
Kim-Anh Tran c568467edd [e2e] Disabling failing test on Mac
This test seems to be failing after a Chromium roll. Disabling it for
now.

Bug: chromium:1256710
Change-Id: Id5abb7f3f846187d268bf09d42fabf2470fd3c1a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3205171
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-10-05 10:19:47 +00:00
Changhao Han 5b178291bc Disable flaky test in memory e2e tests
Bug: chromium:1239550
Change-Id: I57010905189ac8233f42e1871b173d3d147f16b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093153
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2021-08-13 17:31:50 +00:00
Wolfgang Beyer be0727c813 Turn assertNotNull() into assertNotNullOrUndefined() for e2e tests
`assertNotNull()` of `undefined` does not cause the test to fail,
whereas `assertNotNullOrUndefined()` does.

Because of import restrictions, platform.js's
`assertNotNullOrUndefined()` is copied to helper.ts.

Bug: 1072335
Change-Id: Iaa56492c2f58f735cb93b434f6a73c65cdb740c5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3057046
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2021-07-30 08:50:56 +00:00
Sigurd Schneider 14d3df4a0f Make test in test/e2e/memory/memory_test.ts more robust
The test
  Puts all ActiveDOMObjects with pending activities into one group
has been seen flaking on the waterfall a couple of times.

Bug: chromium:1056170
Change-Id: I952a8cef95f5db21d509782b83faed57cc2338ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2992886
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-06-30 13:26:39 +00:00
Michael Lippautz ea3882b497 e2e/memory tests: Change pending activities test
Change test that ensures that "Pending activities" are present.

Before this CL, we would test that a root group "Pending activities"
exists which contains the actual pending activities, e.g. MediaQueryList
in the test.

After the CL, we ensure a different graph where a that a regular object
named "Pending activities" retains the pending activities. In addition,
we test the the object retains the activities via some intermediate
backing store represented as InternalNode.

Blink dependency: https://crrev.com/c/2954763
Follow up removing old behavior: https://crrev.com/c/2960454

Bug: chromium:1056170
Change-Id: I1cfd3c13c55ca2d4c29056fdb2ac9fabbcbbc0bb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2956328
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2021-06-14 13:51:05 +00:00
Jan Scheffler 551be57016 Update puppeteer to v10.0.0
DISABLE_THIRD_PARTY_CHECK=Update puppeteer requires type changes

Bug: None
Change-Id: Ifda85d161fc94567e4cfaaab0acc2da2f2c29d30
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2953266
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-06-11 09:22:36 +00:00
Danil Somsikov 5089cc55b3 Not show "Allocation" perspective when stacks are not recorded.
This featured doesn't work without stacks and currently thorws an error
into the console.

Bug: 1063601
Change-Id: Ic6ccfc5e4bc1ae84f28a64531ca4e9a8bab6b2ee
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2944948
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2021-06-09 08:17:04 +00:00
Danil Somsikov 8ba04b1f23 Fix empty allocation view when instrumenting on timeline
Bug: 1063601
Change-Id: I0f63e89ce89dace4a996f05086f3a4e4780e8959
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2940844
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-06-07 07:17:06 +00:00
Andres Olivares 73b694cc64 Disable flaky test on Linux
This test was skipped only for Mac but recent builds show it remains
flaky on Linux as well:

https://ci.chromium.org/p/devtools-frontend/builders/ci/Linux%20Official/958

https://ci.chromium.org/p/devtools-frontend/builders/ci/Linux%20Compile%20Full%20Release/2473

https://ci.chromium.org/p/devtools-frontend/builders/ci/Linux%20Official/946

R=jacktfranklin@chromium.org

Bug: 1134602
Change-Id: Idf7d709bc115d01347a3ef42bf594261d0611ddf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2912770
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2021-05-24 12:59:37 +00:00
Sigurd Schneider dd1cec6af9 Add test for allocation sampling in memory profiler
Bug: chromium:1199493
Change-Id: I6f0d2727e38625db47be58121282811f75071ba4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2850633
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-26 11:12:00 +00:00
Sigurd Schneider bf2d6f7351 Reactivate test in test/e2e/memory/memory_test.ts
Stressors show that this test is only flaky on mac,
hence re-activating for other platforms.

Bug: chromium:1134602
Change-Id: I6cc5d42fe50292c3dbb74ce5eff2ada68665f7d5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2850636
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-04-26 10:17:50 +00:00
Sigurd Schneider 3f30112473 Add test for tooltip in heap object explorer
Bug: chromium:1185573
Change-Id: I55c9e1193a8192754347da0e1ab803c21c133e4a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2742206
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-03-16 12:55:44 +00:00
Jack Franklin 4a2de02dc0 Remove obsolete TODO
Now we have a new data-grid which we will move to in time, it doesn't
feel worth investing in a lot of util functions for the existing
data-grid.

Bug: none
Change-Id: I4c83ef806d6d289f2b0a952a1930a7f74564fe33
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2667188
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-02 14:37:44 +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
Jack Franklin fc495906c3 Enforce no TS non-null bang assertions
This CL bans the TS `!` operator which is used to assert not null.

Typically when we use this we are making errors harder to track down
should the value actually end up being null. Checking it takes more work
but will give nicer errors.

Fixed: 1154182
Change-Id: I11599541c199204e4ca21c9fd81a256614d70389
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566804
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-02 14:46:50 +00:00
Eric Leese 3048829bb6 Disable flaky e2e tests
Many new flaky tests due to failing on error logs.

Bug: chromium:1134602, chromium:1134593, chromium:1134579
Change-Id: I23dce970f7819ad82074d38b9939add253aab55f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2445781
Commit-Queue: Eric Leese <leese@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-10-02 16:45:00 +00:00
Jack Franklin 7f54469515 Fix heap snapshot test flakes on Mac bots
I was able to recreate this reliably on my Mac machine by upping the CPU
throttling. I added all the `steps` in such that I could see where it
failed and it always failed waiting for the retainer chain.

I then ran `it.repeat(50, ...)` with a timeout of 40,000ms and that
passed. I lowered it to 30,000 and about 90% of the tests passed, but
the odd one flaked. Therefore 35,000 seems the sweet spot.

I'd love to fix this "better" but there didn't seem to be an obvious
problem beyond this test taking time to run due to the nature of the
heap snapshot and how intensive it is to render and update.

Fixed: 1134093
Change-Id: Ibd160518b03067d7cda3077f2136f0ee1ff887a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2443624
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-10-02 11:46:10 +00:00
Jack Franklin 88781c962a Migrate heap snapshot multiple retainers layout test
Replaces this layout test: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/inspector-protocol/heap-profiler/heap-snapshot-with-multiple-retainers.js.

Bug: 1110817
Change-Id: I2e56235f07ee31b646df6c634885e5c302b33b42
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2409978
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-09-16 13:55:37 +00:00
Jack Franklin 332c1259ae Migrate Heap snapshot test for detached iframe.
Replaces this layout test: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/inspector-protocol/heap-profiler/heap-snapshot-with-detached-iframe.js

Bug: 1110817
Change-Id: Ic173e4899c4fd7bcadc955ff3a34a6fa0e5a6acf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2409979
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-09-16 12:29:47 +00:00
Sigurd Schneider a1f84f4a73 Make e2e test more flake resilient on Mac
This CL fixes a problem where Window names retainer chains
were not consistenly reported across platforms. In particular,
some windows will be called 'Window /' on one platform, but
only 'Window' on other platforms (occassionally).

This CL normalizes window names further to just "Window".

Bug: chromium:1110817
Change-Id: Ie37a4a627bde55b58ff7964701754ac987c081fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2412329
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-09-15 16:33:49 +00:00
Sigurd Schneider 8b1a5e7995 Turn layout test into e2e test
This turns
inspector-protocol/heap-profiler/heap-snapshot-with-no-detached-iframe.js
into an e2e test.

Bug: chromium: 1110817
Change-Id: I659e017e9d068515736e92a40b3ac7692dccf321
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2412328
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-09-15 16:03:19 +00:00
Jack Franklin b5093d61e2 Add timeout to Heap snapshot tests
The heap snapshot UI is large and renders a lot of data. When running
the tests locally with `STRESS=1` (to emulate slower bots vs my MacBook)
they routinely fail. Upping the timeout to 15 seconds eliminates the
failure (tested via multiple `it.repeat` runs). I also tested a 10
second timeout, but that wasn't long enough.

Bug: 1110817
Change-Id: I88d44e5e7a3c6119cdf9b28b1774ebc102439ea4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2410220
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-09-14 15:38:18 +00:00
Jack Franklin 8ed34138a3 Migrate detached DOM tree heap layout test to e2e
Original layout test here:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.js

Bug: 1110817
Change-Id: I1ed1808e89cd6ff63c5aded69c058777689bf549
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2406158
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-09-11 14:56:44 +00:00
Jack Franklin f56bc382ec Migrate devtools-active-dom-objects heap layout test
Bug:  1110817
Change-Id: I38bb4d748f5f70388b7b0808090498929462928a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2406156
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-09-11 14:24:44 +00:00
Jack Franklin ce0b5b3b31 e2e test for heap-snapshot-with-event-listener
Migrates the event listener layout test [1] to an e2e test.

[1]:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.js

Change-Id: I2ca4fbd387b120ef16ad15e61c5cc0f1752715c7
Bug: 1110817
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2404656
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-09-11 13:53:04 +00:00
Sigurd Schneider b820513f2f Rewrite heap snapshot test as e2e test
This rewrites the following chrome-side test
inspector-protocol/heap-profiler/heap-snapshot-merged-nodes.js
as end-to-end test.

The CL also introduces the necessary helpers to port the remaining
tests to e2e tests.

Bug: chromium:1110817
Change-Id: I5948a974d3300d7ae309793daaebec85f79d2f56
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2398821
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-09-09 10:39:59 +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
Johan Bay 00fc92a773 Reland^2 "eliminate initial timeout in waitForFunction"
`waitForFunction` previously always waited 100 ms before checking if
the given function is truthy. We can improve the total e2e test suite
running time by 40-50 s by eliminating this timeout. This,
unfortunately, makes some of the tests flake since they relied on this
timeout. This CL attempts to eliminate the timeout and patch the tests
that relied on it. In the cases where a test could not be patched the
timeout is inserted in the test explicitly.
Local experiments showed that this CL reduces the total runtime from
on avg. ~309 seconds to an avg. of ~264 seconds.
This amounts to a ~45 second reduction or ~15%.

This is a reland of a26e3406c7
which was a reland of 3be2087f9d

Bug: 1112692
Change-Id: I3a5156d35553415bfbac95c0251b849ed77f4767
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2354096
Commit-Queue: Johan Bay <jobay@google.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-08-17 06:21:56 +00:00
Simon Zünd f3cd1098d0 Revert "Reland "eliminate initial timeout in waitForFunction""
This reverts commit a26e3406c7.

Reason for revert: Still causes flakes on the Mac bot.
Example: https://ci.chromium.org/p/devtools-frontend/builders/ci/Stand-alone%20Mac/475

Original change's description:
> Reland "eliminate initial timeout in waitForFunction"
> 
> `waitForFunction` previously always waited 100 ms before checking if
> the given function is truthy. We can improve the total e2e test suite
> running time by 40-50 s by eliminating this timeout. This,
> unfortunately, makes some of the tests flake since they relied on this
> timeout. This CL attempts to eliminate the timeout and patch the tests
> that relied on it. In the cases where a test could not be patched the
> timeout is inserted in the test explicitly.
> Local experiments showed that this CL reduces the total runtime from
> on avg. 5:05 minutes to an avg. of 4:19 minutes.
> This amounts to a ~46 s reduction or ~15%.
> This is a reland of 3be2087f9d
> 
> Bug: 1112692
> Change-Id: Id92542de85920f95bb922d1b62ddfb63b83a055a
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2346366
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Changhao Han <changhaohan@chromium.org>
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Commit-Queue: Johan Bay <jobay@google.com>

TBR=mathias@chromium.org,changhaohan@chromium.org,jacktfranklin@chromium.org,jobay@google.com

Change-Id: I607b04d929ec32dd518d3b6c472747a9e2e687b3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1112692
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2352727
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-08-13 08:49:02 +00:00
Johan Bay a26e3406c7 Reland "eliminate initial timeout in waitForFunction"
`waitForFunction` previously always waited 100 ms before checking if
the given function is truthy. We can improve the total e2e test suite
running time by 40-50 s by eliminating this timeout. This,
unfortunately, makes some of the tests flake since they relied on this
timeout. This CL attempts to eliminate the timeout and patch the tests
that relied on it. In the cases where a test could not be patched the
timeout is inserted in the test explicitly.
Local experiments showed that this CL reduces the total runtime from
on avg. 5:05 minutes to an avg. of 4:19 minutes.
This amounts to a ~46 s reduction or ~15%.
This is a reland of 3be2087f9d

Bug: 1112692
Change-Id: Id92542de85920f95bb922d1b62ddfb63b83a055a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2346366
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Johan Bay <jobay@google.com>
2020-08-13 08:09:10 +00:00
Sigurd Schneider d12b93955a Revert "Eliminate initial timeout in waitForFunction"
This reverts commit 3be2087f9d.

Reason for revert: Causes a lot of flakes on the devtools waterfall,
see commit 3be2087f (this CL) and the following CLs.

This is a difficult change, because discovering all test that needs
fixing is difficult. Please do land-revert-reland cycles until we've
fixed all tests. Analyzing the redness referenced above will reveal
more tests that needs fixing.

Original change's description:
> Eliminate initial timeout in waitForFunction
>
> Bug: 1112692
> Change-Id: I28bc29b0f5c2af55d3cf54614fe4d6641b64dd76
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2336716
> Reviewed-by: Mathias Bynens <mathias@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Changhao Han <changhaohan@chromium.org>
> Commit-Queue: Changhao Han <changhaohan@chromium.org>
> Commit-Queue: Mathias Bynens <mathias@chromium.org>

TBR=mathias@chromium.org,changhaohan@chromium.org,jacktfranklin@chromium.org,jobay@google.com

Change-Id: Id7dd3cf313cf4a74e758c28aed5400517bc5f2a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1112692
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2339526
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-08-06 08:24:49 +00:00
Johan Bay 3be2087f9d Eliminate initial timeout in waitForFunction
Bug: 1112692
Change-Id: I28bc29b0f5c2af55d3cf54614fe4d6641b64dd76
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2336716
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-08-05 17:24:16 +00:00
Jose Leal Chapa 8dbca52cb2 Re enable memory test
Use correct selector for table data. Since the previos selector appeared before the actual table was loaded giving inconsistent results.

Bug: 1086641
Change-Id: I8f8e6239528c2a0ef8f9133d534d201bb1799d2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2258837
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Commit-Queue: Jose Leal <joselea@microsoft.com>
2020-06-23 15:42:04 +00:00
Patrick Brosset 0805f4a033 Shared goToResource e2e helper to simplify tests
This introduces a new goToResource shared helper for all e2e puppeteer
tests to use.
It helps simplify a bunch of tests and other helpers in that they don't
need to replicate the `${resourcesPath}/some/file.html` part.
Because this helper also knows how to get hold of the target on its own
it also further simplifies other tests that don't need to import it
anymore.

The next step would be to create a shared helper that knows how to
navigate to panels inside the DevTools front-end as this is also
duplicated across tests.

Bug: 1091226
Change-Id: I717455a51dec30e153d796ef101eab3d42bc2da1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230320
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Jose Leal <joselea@microsoft.com>
2020-06-11 09:52:45 +00:00
Brandon Goddard 7fcdcd12f8 Memory: Disable failing snapshot test
This CL disables a memory test that appears to be failing/flaky in CQ:

https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8879215888190468960/+/steps/E2E_tests/0/stdout

1) The Memory Panel
   Can take several heap snapshots :

   AssertionError: expected 0 to not equal 0
   + expected - actual

   at Object.waitForHeapSnapshotData (test\e2e\helpers\memory-helpers.js:31:19)
   at runMicrotasks (<anonymous>)
   at processTicksAndRejections (internal/process/task_queues.js:94:5)
   at async Context.<anonymous> (test\e2e\memory\memory_test.js:18:9)

Bug: 1066813
Change-Id: I3af4c21dbdca3d415b8b0c4a14855d1f3151e867
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2216551
Reviewed-by: Jose Leal <joselea@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
2020-05-26 19:00:50 +00:00
Jose Leal Chapa 5fb0d44a01 Fix: Memory panel e2e test.
Fix aria label and wait for sidebar content.

We were previously waiting for the enclosing panel which did not guaranteed that the button existed. This caused flakyness..
This CL waits for the sidebar panel content to be loaded before looking for the button to take a new snapshot.

Bug: 1083134
Change-Id: I6f66df6b2f82deb0075360427985b6447d730166
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2204361
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jose Leal <joselea@microsoft.com>
2020-05-18 16:04:52 +00:00
Changhao Han 93a2a7fcc4 skips one flaky test in e2e/memory/memory_test.ts
Bug: chromium:1083134
Change-Id: I3dea55049e4312ca80bf7da211b9450fc438ceb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2203444
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-15 09:35:26 +00:00
Jose Leal Chapa 8321a572fc Add e2e tests for Memory panel
Bug: 1079076
Change-Id: Ic160aefc7da4f1347b32edf1d6f0991e8e02543d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2191712
Commit-Queue: Jose Leal <joselea@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
2020-05-14 21:50:56 +00:00