This piggybacks on the same patterns as found in ResourceWebSocketFrameView.ts.
- Note that we are searching the id, type, and data fields because they
all can be user generated
- Changes test behavior to honor newlines in *.rawresponse files
Fixed: 1488863
Change-Id: Ib73fc13fb3c44696ac9805d63d432b45545dc020
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4973389
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Charles Vazac <cvazac@gmail.com>
This CL changes e2e tests to load the DevTools frontend on the
'devtools-frontend.test' origin instead of using 'localhost'.
'localhost' is used by the target page. If we also load DevTools via
'localhost' than the two pages share window.localStorage and are
considered "same-origin", which hardly reflects reality.
To enable this CL, we have to change the hosted-mode server to set
some CORS headers. More specifically, we allow the DevTools frontend
to request arbitray resources from the hosted-mode server, while
target pages have to be explicit in their ".headers" or
".rawresponse" files.
The CL also rebaselines a couple of e2e test that expect exact
response sizes or expect exact response headers.
R=jacktfranklin@chromium.org, pfaffe@chromium.org
Bug: 1297458
Change-Id: Ie18069e2effcc53cfd10a19296dc5d5c74b40e17
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3467975
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
This CL adds issues for the CORS error codes
InvalidAllowCredentials
PreflightInvalidAllowCredentials
This also adds the $host_port replacement for headers in .rawresponse
files. This is useful if a HTTP header need to whitelist an origin
(which includes the port). Since our test setup changes the port
we host on every time, this placehoder is used in
test/e2e/resources/issues/acac-invalid.rawresponse
Screenshot: https://imgur.com/a/6lhV7WB
Bug: chromium:1141824
Change-Id: I9fb4a944241a5479b55cf5f97d46001346bb8a26
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2846328
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Rather than hardcode the port to use, use port 0 which
requests any free port from the OS. We report the port
we end up using to the caller over IPC, if an IPC
channel was opened by the caller.
We wait for the port to get reported before starting
the chrome instance.
Previously we started the hosted mode server and then
started chrome without waiting for it to start. This is
probably fine in most situations because chrome takes a
while to start and we need to do extra setup there, so
we have a long time before the server needs to respond.
For parallel test mode, we need to make sure we start
the server on a free port. This also makes the mocha
runner more robust to failures e.g. if we accidentally
leave the server running and the port is taken.
This doesn't slow down the startup time of the e2e
test runner at all, according to timing of local runs.
Bug: 1101784
Change-Id: Ibb14d5a177ba5f9e257743824770bff3d5ccb033
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2285124
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Changes include:
- Test server handles URLs with escaping better.
- Logging from DevTools frontend now logged by the test.
- Helper to turn on CDP logging - for debugging only.
- click helper improved to allow specifying maximum distance from
left, for when an element extends far beyond its containing
element.
- New pressKey helper that makes keyboard shortcuts easy.
- Helpers to modify and save a source pane and to get the text of
the line of code where we are stopped.
Bug: 1094436
Change-Id: I389eaa680bb0771a45104f470647f67b4fa5d1d9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2282811
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
The e2e-tests now use the build output in resources/inspector in
the out directory. This allows us to introduce TypeScript-authored
files in the source directory `front_end`, which will get compiled
into resourc/inspector.
After to making a change to a e2e-test or the front_end, you need
to rebuild Devtools, after which you can run `npm run e2etest` as
normal.
Since we now use the build output, this also means that you can
run the e2e-tests on the release build. In other words, if you
build DevTools with build optimizations (such as Rollup), the
e2e-tests will now use the output (and thus provide test coverage).
DISABLE_THIRD_PARTY_CHECK=Node fixes
R=aerotwist@chromium.org,jacktfranklin@chromium.org
Fixed: 1088463
Change-Id: I02ec3c2476bc3647158fede9e1d347963b3a720a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224809
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
This checks in the InspectorBackendCommands in the source tree file
and ensures that it is kept in sync whenever the third_party
location has been updated.
In the process, I discovered multiple misconfigurations in the formatting
presubmit check. First of all, it was never running, because the
.eslintignore had an empty line. Second of all, it was running twice,
which is unnecessary since we now check for changed files at the end
of the presubmit. Lastly, it was only formatting JS files, while it
should check all files.
I have also updated the _CheckGeneratedFiles check to only run if it
is actually necessary. If there are no changes made to any affected of
the files, it will skip the step. This should thus reduce the presubmit
time and we will only pay the cost if we actually update any of the
files.
Lastly, it will now properly format and lint the generated files. This
makes reading the code a lot easier and makes it easier to digest the
diff when a protocol update goes through. I have verified that, in a
full build, the files are still minified. Thus, this has no impact on
the loading performance.
DISABLE_THIRD_PARTY_CHECK=Updating protocol generation
Fixed: 1056614
Change-Id: If49b0e749978ea1a7838992ec13507ee761ad76c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2087765
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
ARIAProperties.json5 represents the certain rules captured in the ARIA spec.
This change also uses it to generate the list of ARIA attribute name constants,
and to generate the ARIA autocompletion configuration for devtools.
Also adds pyjson5 as a third_party library.
Change-Id: I622e590196be667ed97288a73d040856380f3bf9
Reviewed-on: https://chromium-review.googlesource.com/737397
Commit-Queue: Alice Boxhall <aboxhall@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#560222}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a39ce6e61cd170b5b549f119f3b6f7a08253cba9