Commit Graph
88 Commits
Author SHA1 Message Date
Wolfgang Beyer 5b433b0844 Add network request context menu entry for creating header override
This CL adds the ability to create header overrides from the list of
network requests in the network panel via the context menu.

If a local folder for storing local overrides has already been
configured beforehand, the context menu takes the user straight to the
'.headers' file where header overrides are to be specified. If
overrides have not been configured before, the user has to name a
local folder for storing overrides first.

Video: https://i.imgur.com/kLGlOtL.mp4

Bug: 1297533
Change-Id: I8b31fe41d922e1662da68320fcc188c596c0a058
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3542245
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-05-13 08:27:54 +00:00
Wolfgang Beyer 2390df881c Fix another flaky e2e-test in network_test.ts
Bug: 1093287
Change-Id: I99ce4fe42839a77f6b56a8b2fea7a28df0ceb713
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3629858
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-05-06 11:43:38 +00:00
Wolfgang Beyer 57f2920874 Fix flaky e2e-tests in network_test.ts
Bug: 1093287
Change-Id: I2b9c91b78f9f2e7e42091786ad11013dffdc5cbf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3629778
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-05-06 11:37:20 +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
Ross A. Wollman 33f61e8c21 Add repro for stuck Service Worker pending request
The main request for a Service Worker scripts currently gets stuck in
the "(pending)" state.

This test will currently fail like:

```
1) network/network-datagrid_test.ts: The Network Tab
      shows the main service worker request as complete:

    AssertionError: expected { Object (status, time, ...) } to have property 'status' of '200OK', but got '(pending)'
    + expected - actual

    -(pending)
    +200OK
```

The issue appears to be rooted in the misalignment of network request ids
between the inial network CDP event for the request compared with
subsequent events.

Running this test with an executable built from https://chromium-review.googlesource.com/c/chromium/src/+/3544685
passes.

Bug: 1304795
Change-Id: I14f8d64d58fad16e4ddb0acf2058ed4c613c5500
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3566669
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-04-08 19:13:36 +00:00
Danil Somsikov 0957e53050 Update test webbundle resources to use uuid-in-package instead of removed urn:uuid:
Bug: 1314256
Change-Id: Ife2c4c7e9ad6cac97eb80aef11ef8614512280b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3575950
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-07 17:09:25 +00:00
Wolfgang Beyer 78d7eef96b Disable tests to unblock updating Chromium dependency
Bug: 1314256
Change-Id: I1050485c03d159eed2f57b39056d752b7b385275
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3575939
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-07 11:44:45 +00:00
Philip Pfaffe 95bce20a24 Prevent making requests in the network request preview tab
When filling the iframe that's showing the preview for html requests, we
encode the html contents as a data-url and also set the sandbox property
on the frame. This avoids remaking the request from within devtools.
It's still possible for the iframe to spawn some requests. With this CL
we prevent requests by setting the csp for the iframe.

Bug: 833147
Change-Id: Id77321465c91fd68e5d6c6c3681e48b39cb32d14
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3557989
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2022-03-30 12:09:32 +00:00
Simon Zünd db5dcc9f1a [e2e] Load DevTools on a different origin than the target page
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>
2022-02-16 12:43:57 +00:00
Danil Somsikov 19f1ef45e1 Add test cases from third_party/blink/web_tests/http/tests/devtools/network/network-filter{,-internals} to the third_party/devtools-frontend/src/test/e2e/network/network-filter_test.ts so that we can delete the former.
Bug: 1238279
Change-Id: I2cea6156e089f11a6414390dcb960f9cbc088a5a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3455494
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-02-14 14:22:48 +00:00
Danil Somsikov c44615a145 Add e2e test for raw headers to that we can delete flaky DevToolsTest.TestNetworkRawHeadersText test
Bug: 1288549
Change-Id: Id1798e2f555dc071c6d553fc5ab518f4389b817a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3455795
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-02-14 10:40:37 +00:00
Simon Zünd b7c0be6a85 [e2e] Enable caching in hosted mode server
This CL sets the `Cache-Control` header, allowing Chrome binaries to
cache DevTools resources for up to an hour. While that sounds a lot,
keep in mind that different invocations use fresh Chrome profiles, so
the cache is implicitly cleared between test suite re-runs.

Running the e2e tests in test/e2e/application/ yielded:

With cache: https://pastebin.com/w7Nh2rYW
Without cache: https://pastebin.com/XVNRCdQm

Keep in mind that we collected the numbers against a "is_debug=true"
build. The difference for release builds might not be as pronounced.

R=jacktfranklin@chromium.org, pfaffe@chromium.org

Bug: None
Change-Id: I9f729f453eefad5867aaf144d12d81ead67a2506
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3447414
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-02-10 15:03:25 +00:00
Takuto Ikuta f342a5145f replace protocol.d.ts with protocol.ts
This is to make const enum in protocol.d.ts works with esbuild in
unittest.

Without this, const enum usage from protocol.d.ts is not replaced with
esbuild. So I need to make protocol.d.ts actual TypeScript file and make
it has corresponding JavaScript file with defined enums.

I also need to tweak how protocol.js is imported to make build/test pass
in both tsc and esbuild with child CL.

Bug: 1278663
DISABLE_THIRD_PARTY_CHECK=change generated/ and importing files
Change-Id: Ic5f27633c85bbfe8647636beef9b8625f33eabdd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3367593
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
2022-01-24 01:35:02 +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
Danil Somsikov e2e1bdae2a Don't add payoad tab twice
Bug: 1273972
Change-Id: I9bf27d223398c4d7511178d3403f9dff4b79fb4f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3304173
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-29 11:27:20 +00:00
Danil Somsikov 1afa110fd3 Ensure payload tab is selected when selecting different request
Bug: 1267891
Change-Id: I06883acc2cee6eec11b107a4c30c79f3ea9204e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3302736
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-11-26 11:04:31 +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
Tim van der Lippe c1ab112d90 Port the sources panels to CM6
R=tvanderlippe@chromium.org

Bug: 1241848
Change-Id: Idfe1658c9c2948b5c79c2845b9fd9472746a62b9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3247435
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-12 16:47:28 +00:00
ergunsh ee4a613851 Add keyboard shortcut for Replay XHR
Bug: chromium:1050021
Change-Id: I5566ae7de3b1b8f3b3ad3184d50f7f4220c2adc1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3251579
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2021-11-08 07:43:18 +00:00
Jack Franklin 425514c9ec Skip network request blocking e2e tests
They are causing failed builds on the waterfall. See bug for details.

Bug: 1259120
Change-Id: I4125a9183996cc17a0fc2f97ea32a33160ecbbc7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3217625
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-10-12 13:26:27 +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
Danil Somsikov eae72f667a Extracted Payload tab out of Headers tab.
Bug: 1214030
Change-Id: I75afbb830264c3f0f55c8c177a8586ee903899e4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3150289
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-09-13 07:47:11 +00:00
Danil Somsikov 55304c6cd8 Added a smoke test for the Header tab in Network view.
This should give us a little bit more confidence when extracting
Payload tab.

Bug: 1214030
Change-Id: I26039ad49980255f411655156c0d4ac2ae545c40
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3151803
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-09-10 14:40:11 +00:00
Kriti Sapra 56daf78ddb Updated no-multiple-empty-lines to only have 1 as max
DISABLE_THIRD_PARTY_CHECK=updated linting formatting
Bug: 1106746
Change-Id: I371bca95b7cf1e8b7eaa4f9e7c3860af4eedee3e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3057042
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-28 14:10:15 +00:00
Sigurd Schneider 6d53f1f7c9 Prioritize HTTP errors over cors errors in network status column
Previously, DevTools would mark 404s on CORS requests as cors errors,
and point out missing headers. While the headers are *technically*
missing, the information that the request 404'd is more important to
web developers.

This CL prioritzes HTTP error codes (>=400) over CORS errors in the
network panel's status column. This was previously not possible, as
for CORS errors the underlying reponse code was not reported, which
changed in https://crrev.com/c/3043654.

Bug: chromium:782442
Change-Id: I38d9acc938bfbfe3b8f63e49cf81aaf7f0429fbe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3055236
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-07-27 14:27:19 +00:00
Danil Somsikov 1e996707c5 Apply websocket message filter on view load. Try#2
Improved tests to wait for exact number of messages instead of minimum amount, which was causing flakiness.

Bug: 1228705
Change-Id: I2fb2b095d8a544eec4ff22e7674b3312ecfe7179
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3053741
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2021-07-26 14:28:27 +00:00
Simon Zünd 1ee58f9874 Revert "Apply websocket message filter on view load."
This reverts commit 89d49c6e7b.

Reason for revert: Newly added test fails on linux.
See: https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8840656112097708576/+/u/E2E_tests/stdout

Original change's description:
> Apply websocket message filter on view load.
>
> Bug: 1228705
> Change-Id: Idd3bb46e3754ef85733303b89114d635db292c9e
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3048478
> Auto-Submit: Danil Somsikov <dsv@chromium.org>
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>

Bug: 1228705
Change-Id: Ifda4fdc91f6845074df448e1355ae95b27d3162a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3053739
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-07-26 11:59:27 +00:00
Danil Somsikov 89d49c6e7b Apply websocket message filter on view load.
Bug: 1228705
Change-Id: Idd3bb46e3754ef85733303b89114d635db292c9e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3048478
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-26 09:05:17 +00:00
Victor Porof 66878d6044 Add an 'invert' checkbox to invert all network filters
This functionality adds on top of the existing query mechanism, rather
than modify it.

This is because a query string can have multiple filters, some of them
regular expressions, some not. Each one of those filters could already
be negated with a "-" prefix, including the regular expressions. The
newly added top-level `invert` checkbox therefore inverts each one of
those individual filters, and properly handle the situation where a
query has multiple filters each with its own optional negation.

The drive-by changes to TextUtils.ts are primarily cosmetic, modernising
the JS slightly to help readability.

Change-Id: I3d429a98074eb3517ec891a848ea75c6c96d1ea5
Signed-off-by: Victor Porof <victorporof@chromium.org>
Bug: 1054464
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3034342
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-07-16 13:51:59 +00:00
Danil Somsikov 721956a238 Add filter UI for third-party requests
See https://imgur.com/a/7cXareV

Bug: 1057457
Change-Id: Iab186b9cf42cf4b488b6c6045cbcfdc0ac089a25
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3009815
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-07-07 14:14:01 +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
chait pinnamaneni b1f9821b52 Adds index to aria labels to give unique names to same input controls
Accessibility insights shows an error in user agent client hints form if there are multiple brands in the brands list (https://i.imgur.com/5Tu4n1a.png). This CL adds index to aria-labels to give unique names to input controls in brands list.

Bug:1215598
Change-Id: I661723cd1deaf1653f8936189a0d2220c44be1ad
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2996909
Reviewed-by: Brandon Walderman <brwalder@microsoft.com>
Reviewed-by: Guangyue Xu <guangyue.xu@microsoft.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Chait Pinnamaneni <cpinnamaneni@microsoft.com>
Commit-Queue: Guangyue Xu <guangyue.xu@microsoft.com>
2021-07-01 19:47:28 +00:00
Danil Somsikov 2a6024123d Also show time as unknown and omit "not yet finsihed" warning for
requests for preserved requests.

Bug: 1072006
Change-Id: Ie81db9ef920c44b4d2d2a8d2000d77250dd45572
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2972693
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-06-21 08:28:08 +00:00
Danil Somsikov 09d734dcc2 Make UI string a sentence to avoid confusion.
Bug: 1182537
Change-Id: I5e14ea626dbd5ff477465a85d31b4b596e209b70
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2960456
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-06-21 07:15:38 +00:00
Danil Somsikov b5e2b3b8e4 Address web bundle e2e test flakiness.
To do that, wait for (the effect of) web bundle events, i.e. expect test
before doing any checks. The network log view might not show web bundle
specific data until web bundle events are received.

Bug: 1182537
Change-Id: I0e8eefb7bb6c9664da3d70a34f18306090bc84e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2963820
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
2021-06-18 12:01:34 +00:00
Danil Somsikov cd1691bc4f Show pending requests from the previous page as unknown.
Only keep alive requests can survive page unload and there's no more
connection to devtools to report the request status.

Bug: 1072006
Change-Id: Ibd30bbd5ea240f2acf56258c2e67eed52d4d12ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2963192
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2021-06-17 13:11:17 +00:00
chait pinnamaneni 750a2d1627 Adds fields for client hints form in Device settings and added the same form in network conditions panel
Improves UX for adding client hints in device settings screen. Instead of adding semi-colon separated value for brands, users will be able to input in different fields. Also added the same form to network conditions panel, so users can easily change client hints from network conditions. In network conditions, user agent client hints gets automatically updated when user changes device from dropdown.

Device settings:
Before: https://i.imgur.com/sn3E1dV.png
After: https://i.imgur.com/rBMNjQt.png

Network conditions panel:
https://i.imgur.com/Sk9k3Bb.png

Bug:1215598
Change-Id: Ie9f75456c67e30bb133675bef756a828fa117719
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2933920
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Brandon Walderman <brwalder@microsoft.com>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Commit-Queue: Chait Pinnamaneni <cpinnamaneni@microsoft.com>
2021-06-16 18:26:58 +00:00
Victor Porof f5df24165c Persist network throttling preset choice between DevTools sessions
This patch does a few things to allow network throttling conditions to
persist. 1: It enhances `Setting` with custom serializer support. This
is because 2: All fields on `NetworkManager.Conditions` values are
considered to uniquely identify instances, and one of those fields is
a title, which may or may not be localized. Since localization strings
may change (or users might decide to use different locales between
sessions), when instances are persisted, localized titles should not be
irrecoverably baked. Therefore 3. A custom serializer "massages" the
serialization data to properly persist these titles, using i18n keys
when needed, or the baked title when these values are user-provided and
no localization is used.

In the future, it might be worthwhile to consider avoiding mixing up
presentation state (e.g.: displayed titles) with behavioral
state (e.g.: the throttling amounts). In this particular case, the
title (along with other properties) doubles as both part of group of
fields which (loosely) uniquely identify instances, as well as the
literal string displayed in the UI, which leads to these complications.
Fixing this however does not seem to be in the scope of this bug.
Tracked by bug 1219425.

R=mathias@chromium.org

Bug: 986267
Change-Id: I47d42d454f945412e97b5e747a6253d54f888ee0
Signed-off-by: Victor Porof <victorporof@chromium.com>
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2947255
Commit-Queue: Victor Porof <victorporof@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-06-15 09:15:04 +00:00
Danil Somsikov e7672c40f2 Implement minimal web bundle preview
https://imgur.com/a/Mu6edRS

Bug: 1182537
Change-Id: I25e791c7b5d1284581e57a82ead066dd5f739b2b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2955364
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-06-11 12:05:59 +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 0c13d2d75b Linking a web bundle icon on inner request to the web bundle request.
Bug: 1182537
Change-Id: I9e43911f750eea929e3b97ac462c22ca22e0bf0d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2953261
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2021-06-10 15:37:17 +00:00
Danil Somsikov 1e9a768d68 Add icons for web bundles and their inner resources.
Bug: 1182537
Change-Id: I3e71311c59d4497ac48d5bb596b50d290fa679a7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2950165
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2021-06-09 16:41:18 +00:00
Danil Somsikov 73839bd1b0 Mark resource from the WebBundle as such and show WebBundle-specific errors.
Bug: 1182537
Change-Id: I1a35a676005cf60d725f23fac0a3900c1a1c21bc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2949050
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-06-09 15:31:48 +00:00
Jack Franklin a75ae7cbb3 Enforce import type when importing TS types.
Bug: none
Change-Id: I02ef1182143b7fe091ce92d59f04ac2188903e0d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886925
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-05-11 14:00:22 +00:00
Kriti Sapra 274ace4270 Changed XHR label to Fetch/XHR
https://imgur.com/gSC8a8R

Fixed: 1201398
Change-Id: Ia5bd8eeab6aa14c82de88c090f1cb78454e65837
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2848239
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-26 15:38:50 +00:00
Guangyue Xu b2b0c3b6c6 Apply user agent client hints for pre-canned devices in the "Network conditions" tab
This change is to fetch userAgentMetadata and override navigator.userAgentData when user selects a pre-canned user agent from the network conditions tab.

Created 3 test scenarios to cover the userAgentMetadata values:
1) a device with userAgentMetadata and fixed userAgent value;
2) a device with userAgentMetadata and dynamic userAgent value where browser version is filled in dynamically;
3) a device without userAgentMetadata.

Bug: 1174299
Change-Id: If38cbb1f26784af890c86b7140b90899a6aa8504
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2832109
Commit-Queue: Guangyue Xu <guangyue.xu@microsoft.com>
Reviewed-by: Brandon Walderman <brwalder@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: John Emau <John.Emau@microsoft.com>
2021-04-23 23:30:38 +00:00
Simon Zünd 2ea5538644 Keep Network tab selection between panel switches
If the user prefroms the following steps:
  1) Inspect a Network request
  2) Select a Tab different from 'Header' (e.g 'Timing')
  3) Open Performance (or any other) panel
  4) Switch back to Network panel

Currently the Network panel will show the 'Header' tab instead of the
tab selected in 2). This is due to a wrong assumption in the code
that assumes the View is always freshly constructed. This is not
always the case.

This CL fixes this by force-selecting the tab only once, the first
time the view is shown after construction.

R=sigurds@chromium.org

Bug: chromium:1184578
Change-Id: I444ffacf1bd0d2377af3ab6f9f30482514f1e0c7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732384
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2021-03-31 09:59:13 +00:00
Alex Rudenko afd74f9d8a Add options to configure accepted encodings in the Network conditions
Screenshot: https://i.imgur.com/Fzu9cpR.png
Bug: chromium:1162042
Change-Id: I5bb03e86564db966e83ce057d6181023c8344d58
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2790879
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-03-30 09:40:18 +00:00
Sigurd Schneider 8a57e3f8a4 Fix MIME test
Bug: chromium:1179656
Change-Id: I065321d86cfa6a85354e5ee5c414f0b0a0f4ff96
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2727710
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-03-02 17:11:17 +00:00
Eric Leese 0b8c99cc37 Disabling flaky network datagrid test
Bug: 1179656
Change-Id: I7f80f7294d782651b04b5f0864ced60c0bd8f648
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2727418
Auto-Submit: Eric Leese <leese@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2021-03-02 08:04:26 +00:00