The error that initially caused these tests to be disabled was:
```
ProtocolError: Protocol error (Runtime.evaluate): Promise was collected
at new Callback (node_modules/puppeteer-core/src/common/Connection.ts:66:12)
at CallbackRegistry.create (node_modules/puppeteer-core/src/common/Connection.ts:127:22)
at Connection._rawSend (node_modules/puppeteer-core/src/common/Connection.ts:278:22)
at CDPSessionImpl.send (node_modules/puppeteer-core/src/common/Connection.ts:537:29)
at ExecutionContext._ExecutionContext_evaluate (node_modules/puppeteer-core/src/common/ExecutionContext.ts:288:10)
at ExecutionContext.evaluate (node_modules/puppeteer-core/src/common/ExecutionContext.ts:189:32)
at IsolatedWorld.evaluate (node_modules/puppeteer-core/src/common/IsolatedWorld.ts:210:20)
at Context.afterEach (test/conductor/mocha_hooks.ts:146:26)
```
This seems to be Pptr related and not a direct issue with these tests
(it also occurs in the global afterEach block, not in the data grid
tests themselves)
Since these tests were disabled we have rolled new versions of Pptr into
DevTools, and I cannot recreate the crash locally, so I think we should
re-enable and see if they are stable. If not, we can then dive properly
into hunting down the issue.
Bug: 1442175
Change-Id: I640fbc8d1345a32b16ba576cc80e2b69311c8120
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4683631
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
These tests are passing locally during stress-testing and promise-delay testing. It's likely these tests are no longer flaky (since Puppeteer has had a significant upgrade since they were marked).
Fixed: 1261763, 1346232, 1347831, 1418918
Change-Id: I66f9b519b4de2bac73505092aae55789ac144b7a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4311824
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
The click helper now only accepts selectors so that it is
able to recover from unstable DOM situations. A new deprecated
helper clickElement is introduced for tests that cannot use a
selector currently. This should serve as a red flag that the
test might suffer from flakiness.
Bounding box and offset computation is removed for now. New
Puppeteer version allows providing relative click coordinates
so we need to use that.
Bug: 1411188, 1409768, 1411196, 1410437
Change-Id: I94a272184530842476bb2a879d862c4bd0930dba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4194329
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Add option to bypass platformSpecificTextForSubMenuEntryItem since
it is not always needed on all items on the context menu.
Bug: chromium:1377770, chromium:1410776
Cq-Include-Trybots: luci.devtools-frontend.try:devtools_frontend_mac_rel
Change-Id: I729775b5621ae5eae140e5333fb5f89f7d7ec8d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196926
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
When refactoring the Theme Support code I mistakenly defaulted the theme
value to systemPreferred rather than default. This meant that under test
conditions some cases were failing on Mac (where we special-case the
soft context menu rendering).
This CL changes over the theme value to default, and unskips the tests.
I've verified that the change works locally, but we'll have to see what
CI makes of it.
R=jacktfranklin@chromium.org
Bug: crbug.com/1285783
Change-Id: I9078b80095b0c4713f655a89596b8c8608ebf799
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3377202
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
This CL is a mix of changes within the DataGrid that improve the logic
around focusable cells. Prior to this CL the DataGrid stored one
value, which was the cell that the user would select if they tabbed
into the DataGrid. That got confusing as we used that value to also
represent the currently active cell that the user has clicked on.
This CL splits those concerns up into two properties, and improves how
we track when the user is or isn't focusing within the data-grid. It
also moves some event handlers from `click` to `focus` for the table
cells which is just a nice tidy up.
Bug: 1211346
Change-Id: If6449f5381134892705f7f42f24b226f8dbf170a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2935284
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
All interaction tests are now lazily instrumented with Istanbul
to obtain code coverage. The interactions tests can be started
with `COVERAGE=1` to obtain coverage. For that, the Mocha hooks
perform the eventual reporting and gathering of data. The instrumentation
is performed in the components server itself.
To make sure that we perform the minimal amount of work required
(since code coverage instrumentation is computationally expensive),
we preload pages to populate the instrumentation cache. Every
interactions tests should preload an example (most likely basic.html)
to populate the cache. Every subsequent test will then use the
already-instrumented code, rather than computing the code over
and over again.
The eventual code coverage is written to /interactions-coverage.
The results will eventually be merged with /karma-coverage
to obtain the union of both unit and interaction tests coverage.
R=aerotwist@chromium.org,jacktfranklin@chromium.org
Bug: 1206705
Change-Id: I5e19b1ecef23d21107210699cb29800556e0415e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2879986
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
This CL adds support for the context menu that appears when you right
click on the body row of the data-grid.
This menu shows columns you can sort by and you can toggle column
visibility via "Header Options" (the text is identical to the legacy
data grid). It also provides a hook for the user to customise and add
their own items to the context menu.
Bug: 1150793
Change-Id: I6a6d8c6c67156a575477c1e6d438261b85d9b034
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2610967
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>