Commit Graph
95 Commits
Author SHA1 Message Date
Simon Zünd e3cdd37fb8 [e2e] Load extensions from the same origin as the DevTools frontend
This CL is a preparatory refactoring. In the future, we want to load
DevTools from a different origin than `localhost` to increase
isolation between test runs (e.g. no shared window.localStorage).

To get there, we have to change how the extension tests load the
actual extension code. The extension must be served from the same
origin as the DevTools frontend. Currently this CL is a no-op, as
both resources and the DevTools frontend are served from 'localhost'.

R=pfaffe@chromium.org

Bug: 1297458
Change-Id: Iedee09d8cdd992f64132add78537428e9e4ab7ae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3466036
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-02-16 10:12:32 +00:00
Simon Zünd 0b5820576e [l10n] Fix e2e test that switches locales
This CL fixes a long-standing disabled l10n test. Initially we didn't
have a 'language' setting so we had to use the emulation feature
to simulate setting `navigator.language`. Finally, this is not how
we solved l10n for DevTools.

This CL adds a new helper that allows setting settings via the
Host API and uses it to make sure that the pseudo local is loaded
and applied correctly.

R=alexrudenko@chromium.org

Bug: 1163928
Change-Id: I1873ed38c9c6ef95ae87b281292e210363764211
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3466035
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-02-16 08:53:32 +00:00
Takuto Ikuta a36c4e87eb extract AsyncScope to separate file
This is extracted from https://crrev.com/c/3330076/36

This is to fix interactions test failure like
```
    1) shows cookies even when navigating to an unreachable page (crbug.com/1047348)
(node:3756728) Warning: Accessing non-existent property 'AsyncScope' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:707:11)
    at Object.get (node:internal/modules/cjs/loader:721:5)
    at waitFor (/usr/local/google/home/tikuta/devtools/devtools-frontend/test/shared/helper.ts:228:67)
    at getElementPosition (/usr/local/google/home/tikuta/devtools/devtools-frontend/test/shared/helper.ts:57:21)
    at click (/usr/local/google/home/tikuta/devtools/devtools-frontend/test/shared/helper.ts:104:13)
    at navigateToApplicationTab (/usr/local/google/home/tikuta/devtools/devtools-frontend/test/e2e/helpers/application-helpers.ts:11:9)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Context.<anonymous> (/usr/local/google/home/tikuta/devtools/devtools-frontend/test/e2e/application/cookies_test.ts:29:5)
```
when we use esbuild.

Bug: 1278663
Change-Id: I9e3ab2d19c4daa56c87e3f77ac917a13d32a7c24
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3394445
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>
2022-01-17 12:40:45 +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
Kateryna Prokopenko 227106dbf3 Allow Network request blocking panel scrolling in blocking disabled state
Bug: 1251542
Change-Id: I4cddc3d939cc1238ea931452762ed69c54871779
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3211977
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2021-10-11 16:14:52 +00:00
Jack Franklin a3f2d16091 Expose RenderCoordinator pending frames count
This change is required to prevent a test timing out when we await the
coordinator being done when actually that work is already done.

Previously the helper would add a listener for the `rendererqueueempty`
event but if the work had been completed by then, the event would never
fire and the test would time out.

Now we expose globally a function to return the count of pending events
and the interaction/e2e test helper will check if that returns `0`, and
if so, resolve, before then adding the event listener.

This means a test that waits for work where that work has actually
already happened will now correctly resolve and continue, whereas before
it would time out indefinitely.

Bug: none
Change-Id: I43243bcc9002c9e97f476a66ed3f42c7313f7fcd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3198872
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-10-01 11:59:40 +00:00
Sigurd Schneider 20e1748d7d Add e2e test for issue caching
Bug: chromium:1240622
Change-Id: I0dcb417a32859b15351a7c5510766a3e6309c900
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3138092
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-09-03 10:54:27 +00:00
Tim van der Lippe d79e3c545b Strongly type key in pressKey
R=jacktfranklin@chromium.org

Bug: none
Change-Id: Ib9eb75bdb76124e1d4f6d54e5b5edcfdea6a4504
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3135426
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>
2021-09-01 14:10:32 +00:00
Jack Franklin fda44a1eb5 Add generic types to $, $$ and waitFor helpers
Puppeteer supports generics on these methods, but we didn't support them
in our helpers. This CL adds support for them, meaning we can avoid `as
HTMLElement` in some of our tests.

Bug: none
Change-Id: I2b229b81522d85e6cd9662fd867932d7e24ab7c2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3110204
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-23 11:45:28 +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
Tim van der Lippe 72f2d4bcc8 Add e2e-tests for focus interactions of console messages
This replaces http/tests/devtools/console/viewport-testing/console-key-navigation.js
as an e2e-test.

R=aerotwist@chromium.org

Bug: 1203169
Change-Id: I461f742e84f13e44eecc74553ced77b5041d3340
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3010115
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-07-07 10:23:47 +00:00
Sigurd Schneider 76cb0e9d20 Refactor matching helpers to support tables
Bug: chromium:1223300
Change-Id: Ifb464b5c7bc3c068e71ccc0f71cf995b3103bfb2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2983019
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-06-24 08:07:48 +00:00
Philip Pfaffe d097e515dc Mark asyncScopes as canceled on timeout
When an e2e test times out, running promises aren't aborted. Instead,
any errors that are thrown are silently swallowed. When not being
careful, in-flight promises can still mess up state, or even never
detect timeouts. waitForFunction is especially vulnerable to this,
because it's running an infinite loop inside the test process. This CL
extends AsyncScopes to carry a flag when a timeout was triggered, which
allows waitForFunction to bail.

Bug: none
Change-Id: I30ebcc45419c4000a1b2a25096ca1211bf2400a0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2978374
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2021-06-22 10:40:48 +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
Paul Lewis 4627047839 Adds renderCoordinatorQueueEmpty helper
This CL adds a helper for e2e / interaction tests that lets us know
when the render coordination work is done.

R=jacktfranklin@chromium.org

Bug: 1210848
Change-Id: I6bde19831aa7eff727c3adc31db852750a3c57cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2912103
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2021-05-25 11:04:33 +00:00
Sigurd Schneider c3f5d19ed6 More waiting in test/e2e/sources/icon-row-bucket_test.ts
Flakes indicate that the .hover() doesn't work reliably. This CL adds
retries to the hover call.

Bug: chromium:1184162
Change-Id: Id79f9185993d7852706173e2d35e9b05986527ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2902811
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-05-19 07:00:52 +00:00
Sigurd Schneider c86b89fe67 Wait for CSP violations tab to update
Bug: chromium:1205766
Change-Id: I896ff541308437d4ee927dd33aec81ecc2939235
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2874129
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-05-05 09:16:46 +00:00
Sigurd Schneider a7d1bb14f4 Correctly handle relative sourcemaps in inline CSS
Previously, if inline CSS had a sourcemap attached, we'd assume that the
sourcemap maps HTML document locations instead of locations relative
to the start of the CSS style tag. This CL adds logic that checks for
inline CSS whether the sourcemap maps the origin location (0,0), and if
so, uses locations relative to the style tag to index the sourcemap.

This preserves the previous behavior for non-inline CSS, and for inline
CSS if the sourcemap doesn't map the origin coordinates.

Bug: chromium:787792
Change-Id: I92c107dc652cc377371dceb8c523d4788f2532bc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2859907
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-04-30 10:53:22 +00:00
Sigurd Schneider 1531610a58 Add issues for CORS disallowed methods
This CL adds issues for the CORS error code

MethodDisallowedByPreflightResponse


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

Bug: chromium:1141824
Change-Id: I13a20f7a7467ddc8c211520679583292499c2f7f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2846338
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-04-26 08:34:30 +00:00
Sigurd Schneider bec4aa4eb5 Add issues for CORS credentialed requests to wildcard origins
This CL adds issues for the CORS error codes

WildcardOriginNotAllowed
PreflightWildcardOriginNotAllowed

Screenshot: https://imgur.com/a/8VmHdQe

Bug: chromium:1141824
Change-Id: I78c1bafa271bc8b4dbe49180d021d66455f790d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2843304
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-04-21 13:16:05 +00:00
Sigurd Schneider 2ca000670d Add issues for CORS response header problems
This CL adds issues for the CORS error codes

InvalidAllowMethodsPreflightResponse
InvalidAllowHeadersPreflightResponse
PreflightMissingAllowOriginHeader
PreflightMultipleAllowOriginValues
PreflightInvalidAllowOriginValue
MissingAllowOriginHeader
MultipleAllowOriginValues
InvalidAllowOriginValue

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

Bug: chromium:1141824
Change-Id: I22b6ed4c782da47d651cd0d0527c01503fc166be
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2837831
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-04-20 11:30:14 +00:00
Jack Franklin 14b4b533b4 [TestRunner] allow e2e resource path to not start with a slash
This is for consistency with every other path option that the runner
takes; because we `path.join()` them they should work with or without
a starting slash. This is the only flag that requires a slash, so I'd
like to change it to make it work with or without.

Bug: chromium:1186163
Change-Id: I2f55da0a82b0d80d33f4d1c8f25c85492cdefd25
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2810279
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-04-07 10:09:29 +00:00
Tim van der Lippe 90d1c17188 Fix ESLint configuration with regards to spacing
ESLint and clang-format previously disagreed on whether there should
be a space before the arrow parentheses. Clang enforces the space
should be removed, which ESLint didn't want to.

Instead, we can configure ESLint to not add the extra space, to avoid
this inconsistency.

Bug: 1177242
Change-Id: Icc4435e86d6f6d9a0861f23f6b1cc95a5fd4d14f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2799753
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-01 14:09:33 +00:00
Jack Franklin 19a283d9fc Export puppeteer from 'test/shared/helper.js'
To make it easier to import from a helper without relying on Node
resolution. This CL only adds the export; if I update all imports to
use it we get a circular dep of:

test/shared:shared =>
test/conductor:implementation =>
test/shared:shared

So I will do some thinking about the best way to break that chain in a
follow-up CL (logged crbug.com/1193946).

Bug:1192498
Change-Id: Ia4d85be76a8018c41d9697e0cb9eda8ca556164e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2792584
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-03-30 09:55:18 +00:00
Jack Franklin 1e39e4a268 [TestRunner] allow the e2e resources path to be configurable
Bug: chromium:1186163
Change-Id: I35031bd570f88de3b884da4e57cb9de5d00e5571
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2782551
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-03-24 10:58:21 +00:00
Alex Rudenko 27d120309b Allow skipping e2e tests for a particular platform
Adds it.skipOnPlatforms function to skip an e2e test only on given
platforms. For example,

it.skipOnPlatforms(['mac'], '[crbug.com/xxxx] test name', ..);

Bug: none
Change-Id: Ia73382628c92195adfae9eebbb426250a5a55973
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2703964
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-02-19 08:27:25 +00:00
Sigurd Schneider 123977af32 Enforce naming convention in test/
Bug: chromium:1057042
Change-Id: Ib95f2640b1acf525cd12e377f0118377ddbe6077
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2695568
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-02-15 14:57:54 +00:00
Simon Zünd 5fd7506a2e [e2e] Add host resolver rules for *.test domains
This CL configures custom host resolver rules for the Chromium binary
that puppeteer is using to run e2e test.

With host resolver rules, all resources can now be loaded via
arbitrary '.test' domains while still being served from localhost.
E.g. an e2e test might navigate to 'devtools.test/foo.html' while
also including an iframe with Url 'bar.test/iframe.html', with both
files being served from localhost.

This unlocks testing for a whole class of features that was
previoulsy impossible to test.

This CL also adds a new helper 'goToResourceWithCustomHost', that
supplements the existing 'goToResource' with a modifiable host part.

R=aerotwist@chromium.org, sigurds@chromium.org

Bug: chromium:1177676
Change-Id: I1f51aa8419619e11352989457b24cc56cfc78e52
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692148
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-12 13:36:02 +00:00
Jack Franklin 5017c095f3 Bump Puppeteer to 7.1.0
Doing so lets me remove some of my hacks for previously broken types.

DISABLE_THIRD_PARTY_CHECK=upgrading puppeteer

Bug: chromium:1176642
Change-Id: I141c6eadfe258ac2c8c31fa86c80f014362ee8ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692157
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-12 12:04:06 +00:00
Jack Franklin 60cc8ba371 Upgrade DevTools Frontend to Puppeteer 7.0.4
DISABLE_THIRD_PARTY_CHECK=upgrading pptr

Bug: none
Change-Id: I3b0672d209bd6a35ab0eed7db7cc158cc40039dc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678700
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-10 14:07:38 +00:00
Alex Rudenko d6594130ef Report low contrast issues
This CL adds the logic to trigger contrast checks on DevTools
startup or on page load events. The check is only triggered if
the corresponding experiment (contrastIssues) is enabled.
Deduplication of the reported issues happens in the IssueManager
on the frontend since the same issue might be reported twice
if there are multiple documents on the target page.

Bug: chromium:1155460
Change-Id: Ib0d5115c527ceb9da9d2ed2dfa48cfdca6f82f60
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2573360
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2021-02-04 12:39:48 +00:00
Sigurd Schneider 1576186355 Enforce member delimiters
This CL enforces member delimiters following
https://google.github.io/styleguide/tsguide.html#member-property-declarations

Bug: chromium:1057042
Change-Id: I2553aeebb8187235cdf0e7f0585da36ea53388bb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2672032
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-02-04 09:03:57 +00:00
Sigurd Schneider 286466e0c8 Reland "Show issues on SAB instantiation"
This reverts commit b3759d720b.

Reason for revert: A chrome test binary roll changed e2e test
behavior between running CQ on the CL and landing it.

Original change's description:
> Revert "Show issues on SAB instantiation"
>
> This reverts commit f366a4ca99.
>
> Reason for revert: Fails on a lot of CQ and trybots.
> E.g.: https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/5128/overview
>
> Original change's description:
> > Show issues on SAB instantiation
> >
> > Bug: chromium:1051466
> > Change-Id: I39f1110d370e3d5cca801112c2b776f697875d64
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2652505
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
>
> TBR=sigurds@chromium.org,jacktfranklin@chromium.org,wolfi@chromium.org
>
> Change-Id: I8a6a8b7aa57be0521615f9569bfdcad86463d8d0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1051466
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2655246
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

TBR=sigurds@chromium.org,szuend@chromium.org,jacktfranklin@chromium.org,wolfi@chromium.org

# Not skipping CQ checks because this is a reland.

Bug: chromium:1051466
Change-Id: Id3858c9b38d4f0dbcbc47dcc86500e8e27258305
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2655248
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-01-28 11:50:08 +00:00
Simon Zünd b3759d720b Revert "Show issues on SAB instantiation"
This reverts commit f366a4ca99.

Reason for revert: Fails on a lot of CQ and trybots.
E.g.: https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/5128/overview

Original change's description:
> Show issues on SAB instantiation
>
> Bug: chromium:1051466
> Change-Id: I39f1110d370e3d5cca801112c2b776f697875d64
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2652505
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>

TBR=sigurds@chromium.org,jacktfranklin@chromium.org,wolfi@chromium.org

Change-Id: I8a6a8b7aa57be0521615f9569bfdcad86463d8d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1051466
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2655246
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-01-28 10:02:18 +00:00
Sigurd Schneider f366a4ca99 Show issues on SAB instantiation
Bug: chromium:1051466
Change-Id: I39f1110d370e3d5cca801112c2b776f697875d64
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2652505
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-01-28 08:52:47 +00:00
Jack Franklin 3b3a782f3a Enable interaction tests
This CL introduces the infrastructure and first test for what we're calling
"Interaction tests". These are tests that can be used to test component
behaviour that cannot be tested via Karma unit tests but don't require an e2e
test either.

The best example here is complex user interactions: clicking and dragging a
mouse, or doing multiple tabs to navigate through the UI.

Note that the one interaction test added here for theme_colors isn't the best
example of a complex test, but it's a test that's good enough for now whilst we
get everything set up on infrastructure and make sure it runs without flaking.

Bug: 1153281
Change-Id: Ifb37639a557c459974f703b8954ae68a93d5d368
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566808
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-03 10:44:22 +00:00
Tim van der Lippe 75c2c9cff5 Disable @typescript-eslint/no-unused-vars
The newest version of @typescript-eslint errors on declare globals.
While this is usually good to point out, we have legitimate usages
of these statements. Based on the discussion in
https://github.com/typescript-eslint/typescript-eslint/issues/2519
it seems unlikely this will be fixed anytime soon. Therefore, let's
disable these specific lines to unblock our upgrade of the linter.

R=jacktfranklin@chromium.org

Change-Id: Iee6339428eef0d5496783850a9026fed00942bcb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566807
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>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-12-01 13:18:25 +00:00
Philip Pfaffe 7426b000e3 [wasm debug] Fix propagating debug evaluate errors in language plugins
When debug evaluation hits exceptions in wasm debugging, the
LanguagePluginManager incorrectly propagated those errors, causing weird
warnings in the wrong places or warnings that are missing altogether.
This CL hooks up the plugin manager with the existing error reporting
mechanisms and includes a test to make sure the errors show up.

Drive-by: In the watch window, when evaluation failed, we previously
swallowed the actual exception. That's probably because most of the time
that exception is a reference error because variables aren't valid in
the current scope. This CL adds a tooltip that shows the exception.


Bug: chromium:1137514, chromium:1153315
Change-Id: Ia1ec81ce95598adf7abab8c4e31c3310e3669fb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2565376
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-11-30 16:34:10 +00:00
Jan Scheffler f74777559c [e2etest] Move hosted mode server to https
This allows testing things that require secure connections
like thrid party cookies.

Change-Id: Id7f6dc672f8a2e701f2baad22fa035826a8d7b2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537951
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-18 12:58:43 +00:00
Peter Marshall 1319aa78f5 [tests] Don't print steps except for error cases
console.log() output is not buffered during parallel testing so it's
hard to associate the step() logging output with the test that
actually caused it. If we want to log stuff like this, we should find
a way to redirect it to the test reporter properly so that it gets
buffered per-test-file and printed all at once, like the describe/
it output is.

The step output probably isn't needed anymore as we have the AsyncScope
output which gives the source-mapped file name + line number in the
test output if there is an await failure, which is even more useful
than the step output.

If people find cases where we do really need this we can add it back,
the step function still exists for now.

Bug: 1101784
Change-Id: Ia90b6532ce348b189ee7c5f2e3ed482f074a6561
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2534207
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2020-11-13 09:03:52 +00:00
Johan Bay f04b99c38e Remove redundant aria labels and update tests
crrev.com/c/2039270 introduced a redundant aria-label on every context
submenu for testing purposes. Now that Puppeteer supports querying the
AOM for computed name and role, we can use that instead and remove the
labels.

Change-Id: I883cd99ab5f289e5f50907336f4638bbcea57df4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2516341
Commit-Queue: Johan Bay <jobay@google.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-11-04 12:50:58 +00:00
Jack Lynch d529e88005 Reland "Settings: Add e2e tests for shortcuts tab"
This reverts commit f3b391e525.

Reason for revert: Some strings are different on mac, creating a reland to investigate a fix

Original change's description:
> Revert "Settings: Add e2e tests for shortcuts tab"
>
> This reverts commit 137f0a1b84.
>
> Reason for revert: Consistently fails on Mac Bot, first failure:
> https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8864995173425920000/+/steps/E2E_tests/0/stdout
>
> Original change's description:
> > Settings: Add e2e tests for shortcuts tab
> >
> > This CL adds several end to end tests for the shortcuts settings tab,
> > including the keyboard shortcut editor.
> >
> > Bug: 174309
> > Change-Id: I293f233f9afde298cb618fbdbb6c9b147b895daf
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2504790
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
> > Commit-Queue: Jack Lynch <jalyn@microsoft.com>
>
> TBR=jalyn@microsoft.com,tvanderlippe@chromium.org,patrick.brosset@microsoft.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: 174309
> Change-Id: Ie5ee124b3ad760dead6745e33591eb7578b69e88
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512225
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>

TBR=szuend@chromium.org,jalyn@microsoft.com,tvanderlippe@chromium.org,patrick.brosset@microsoft.com

# Not skipping CQ checks because this is a reland.

Bug: 174309
Change-Id: I8382dfab7a3e3a3dfaaa36e834d67636b33a6b9c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512850
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
2020-11-03 19:22:47 +00:00
Johan Bay b01fc265f3 Add optional handler argument to $, $$, and waitFor
This allows us to clean up the `textContent`-related helpers a bit,
and makes it easier to use the new `aria` handler in test scripts.

Change-Id: Ifb4b5a88109223b09034ca4ed1f40e54c6e76310
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512236
Commit-Queue: Johan Bay <jobay@google.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-11-03 07:59:16 +00:00
Johan Bay 5a41e47b6f Use Puppeteer's built-in pierce/ handler
Puppeteer now ships with a built-in handler for piercing shadow dom.
We can therefore get rid of our custom query handler that serves the same
purpose.

Change-Id: Id481f2c083e34e9e9976df72a8a7950290f6e923
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512234
Commit-Queue: Johan Bay <jobay@google.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-11-02 14:14:10 +00:00
Simon Zünd f3b391e525 Revert "Settings: Add e2e tests for shortcuts tab"
This reverts commit 137f0a1b84.

Reason for revert: Consistently fails on Mac Bot, first failure:
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8864995173425920000/+/steps/E2E_tests/0/stdout

Original change's description:
> Settings: Add e2e tests for shortcuts tab
>
> This CL adds several end to end tests for the shortcuts settings tab,
> including the keyboard shortcut editor.
>
> Bug: 174309
> Change-Id: I293f233f9afde298cb618fbdbb6c9b147b895daf
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2504790
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
> Commit-Queue: Jack Lynch <jalyn@microsoft.com>

TBR=jalyn@microsoft.com,tvanderlippe@chromium.org,patrick.brosset@microsoft.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 174309
Change-Id: Ie5ee124b3ad760dead6745e33591eb7578b69e88
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512225
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-11-02 07:37:30 +00:00
Jack Lynch 137f0a1b84 Settings: Add e2e tests for shortcuts tab
This CL adds several end to end tests for the shortcuts settings tab,
including the keyboard shortcut editor.

Bug: 174309
Change-Id: I293f233f9afde298cb618fbdbb6c9b147b895daf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2504790
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
2020-10-30 17:26:39 +00:00
Philip Pfaffe 1e8f608def Add a DebuggerPaused DOM event and some tooling to await it in tests
I will use it to get rid of a timeout() in the sources panel tests, but
that will be a followup CL to simplify reverting it if necessary.

Change-Id: I4362135e1dac306d67f29474d1d6aea4ef0f1102
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2498224
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2020-10-28 10:29:44 +00:00
Jesus David Garcia Gomez 9103d0e4fc Fix enum sending telemetry for issues panel opened resource.
This CL fix the event fired for the histogram IssuesPanelResourceOpened.

Bug: 1135327
Change-Id: Ifea9e0ed53aeda0a4017ecc17d9e82d745e62e88
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2451470
Commit-Queue: Jesus David Garcia Gomez <jegarc@microsoft.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
2020-10-12 23:07:28 +00:00
Tim van der Lippe e9b8e99658 Add component hooks to conductor
These will be used in the tests for the style component. We are checking
these helpers/infra in before landing the component, to figure out how
to hook up the tests. I expect the `component_hooks.ts` to be refactored
away, but kept it now for ease of debugging/plumbing.

Bug:1126047
Change-Id: Ia01e16e66b22c353016313636f20f7d0745aac9e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2406162
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-09-23 08:35:24 +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