The Target.model method's type can be improved to convey the type of
the result (based on the constructor argument). This CL does just that.
This unlocks more checking down the line. The CL also alters the types
of the observeModel(s) methods, but in a weaker way, as closure is
apparently not able to instantiate the template correctly for method
invocations.
Bug: chromium:1011811
Change-Id: Ic466cfd946c30f3fcfb4ce24a8a0e1bc542e7d3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2445776
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
To enable full parallelization of all files in sdk/, we can add the
@ts-nocheck annotation to all files. This suppresses existing
TypeScript errors in these files.
We can then one-by-one remove these annotations and fix the issues
reported in these files. This allows us to parallelize the work
and work on many files at the same time.
As a starter, I typechecked sdk/Connections.js to verify that
typechecking works while all other files are not checked yet.
I did do so by locally suppressing all TypeScript errors in
SDKModel.js and remove the `instance` method on `TargetManager`.
I then confirmed that rebuilding with TypeScript correctly
fails on the missing method, but does not require SDKModel.js
itself to be typechecked.
Bug: 1011811
Change-Id: I46de3839f7d837e951967dd932218bda00c6ad5b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2156352
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
This CL changes references to self.Common.console (the global instance
of Common.Console) over to Common.Console.Console.instance(). To keep
both TypeScript and Closure happy we must make a method on the Console
class itself, since it only allows private constructors to be accessed
by static methods on the class.
Bug: 1058320
Change-Id: Icd4ac8aea76383588a5664a96643179d91812698
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2087757
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.
This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.
Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9
This reverts commit fd3d8cadb7971e2934bd98130335d789398ac139.
Reason for revert: http/tests/devtools/indexeddb/live-update-indexeddb-content.js is flaky.
Findit suspects this CL to be the reason for the recent test flakiness. See the bug for more information.
Bug: 979503
Original change's description:
> [DevTools] Await clearing methods in ClearStorageView
>
> Part 1 of adding garbage collection after clearing is done.
>
> Change-Id: I7022c1d6d0d3c8cfabce7f57ba5f689c135b6395
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1669175
> Reviewed-by: Erik Luo <luoe@chromium.org>
> Commit-Queue: Harley Li <hhli@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#673083}
TBR=luoe@chromium.org,hhli@chromium.org
Change-Id: I5849695b3e5d2c3646303c2f49a801ffbc3ee15f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1679704
Reviewed-by: Sergey Poromov <poromov@chromium.org>
Commit-Queue: Sergey Poromov <poromov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#673265}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5a63d041f4c585eaa540963686cc894a342e5de9
Without an entry counter, users might get confused how many entries
are in a cache storage, because the UI indication is not obvious enough.
Besides, adding an entry counter is consistent with IndexedDB tables.
When the path filter is not an empty string, the count reflects how
many responses were matched in total.
Bug: 930865
Change-Id: I058562a251163459eeb2adc24def4888f9a9e863
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1537254
Commit-Queue: Haihong Li (Harley) <hhli@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#644523}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 45237b838f0aaf393967a9a8b46d83bbee20851b
In Applocation>Cache Storage, to preview a cached response, DevTools
needs to call requestCachedResponse() to the backend to fetch it.
Originally, DevTools is unable to fetch cached responses for requests
that have headers, and this is because in DevTools's beckend, the field
'headers' of mojom::blink::FetchAPIRequest remains unfilled. This
patch fixes the issue by filling this field.
Bug: 890359
Change-Id: I599cc1393d5c02baa7d7f90fc22fd379b1745090
Reviewed-on: https://chromium-review.googlesource.com/c/1455272
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Haihong Li (Harley) <hhli@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#630005}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8a7dcd563bc62a5f48731b2c83a0413e59994990
With this patch users are able to search for cache entries which contain a given
URL path in Application panel's cache storage table. Only entries that have the
matching URL paths will be displayed in the table, which supports pagination if
there are too many entries returned.
Bug: 884194
Change-Id: If285cc43859e82f5e59b80b1b761e9836aa5f510
Reviewed-on: https://chromium-review.googlesource.com/c/1345421
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Haihong Li (Harley) <hhli@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#613204}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3c68e3a7bc37f6eeb338e7768735087ae469a329