Commit Graph
2884 Commits
Author SHA1 Message Date
Changhao Han d5a3755f19 Adds check to ensure style pane update
Deleting the last property in a styles section incorrectly skips style pane update.
This check ensures style pane update when the property's index is out-of-bound.

Bug: chromium:1060267
Change-Id: Ie6f6a436c789745bcd1f5ece6162cc4ada82a5b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107525
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-26 00:48:03 +00:00
Kalon Hinds 3ca8bc5a4a Ignore theme stylesheet application in high contrast mode
DevTool themes are applied by patching css properties that modify
colors and copying the ruleset to a separate stylesheet. This
stylesheet is added to the appropriate shadow DOM when its component
is loaded.

High contrast themes use system colors instead of the Devtools patching
mechanism to set color values. However, there are cases where the patched
stylesheet rulesets are higher specificity than rulesets defined in
forced-colors media blocks.

This patch short circuits the patching and application of theme-specific
stylesheets when forced-colors is active.

Before: https://imgur.com/tLnAxTN
After: https://imgur.com/4a3kdPM
Bug: 1048378
Change-Id: I7fc26757d06dd77688ce3cfd823389767d999e3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116947
Commit-Queue: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-03-25 22:00:34 +00:00
Brandon Goddard 9e2b59cb64 Screencast: Add accessible text for the Screencast Nav Bar Controls
This CL adds aria-labels to the navigation control bar on the screencast
tool to allow Screen Readers to understand the purpose of the controls
when focused

Before:
Accessibility Fast Pass: https://imgur.com/1ZwE6If
NVDA reading generic elements: https://imgur.com/9KmFvCQ

After:
Fast Pass: https://imgur.com/9BhVTXt
NVDA reading labels: https://imgur.com/nuSIPO2

Bug: 1064733
Change-Id: I44e44a34bb4f065dd5bc8d30089614c9686db89f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2120282
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Songtao Xia <soxia@microsoft.com>
2020-03-25 21:56:24 +00:00
Kim-Anh Tran 94584718d2 Updates wasmparser to generate unified disassembly
This change to the wasmparser is the front-end change to ensure
that the devtools front-end and the v8 back-end generate a unified
wat format.

Bug: chromium:1043031
Change-Id: I8fb47ce3c538083cf3720026f73d0d1a3a683c11
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2113372
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-03-25 20:51:34 +00:00
Brandon Goddard 449349092a Network: Fix blue focus ring on Network Log Area when Learn More Clicked
This CL fixes an issue that causes the network Log area to receive
a focus indicator when the "Learn More" link is focused/clicked.

This issue was caused because the logic to trigger the focus ring
on the network log area assumed the only focusable content within the
container was the DataGrid. It previously showed the ring whenever
focus was within the container and the datagrid did not have a request
selected.

Now it only shows if the datagrid receives focus and does not have
a node selected.

(Note that this focus logic was included because the
waterfall column is not part of the Datagrid)

Before: https://imgur.com/2cGS207
After: https://imgur.com/LzEDWBW

Bug: 1056138
Change-Id: I5c1f5fd03b5ed674f27c5b591fc76cfa4d46d165
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2120649
Reviewed-by: Jose Leal <joselea@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
2020-03-25 17:29:48 +00:00
Paul Lewis c03c82553f Skips flaky multple-worker test
The skipped test seems to flake out, so temporarily disabling it.

TBR=pfaffe@chromium.org
No-Tree-Checks: true
No-Try: true
Bug: 1064581
Change-Id: Ia3c4c70b55660a8c3d2438620d3dd0fd0dc9be4b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119684
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
2020-03-25 17:28:44 +00:00
Benedikt Meurer 3b291328d3 Disable popover eager evaluation on Wasm frames.
For now, we neither have the front-end nor the back-end logic to perform
Debug-Evaluate of Wasm code, and the popover evaluation is just
confusing since it tries to treat the Wasm as JavaScript. So disable
that logic for now.

Bug: chromium:1063875
Change-Id: I2ab923076b076f55a5318b2f15b10cd921e81e6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119688
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-03-25 17:03:03 +00:00
Paul Lewis ae5e8fb631 Adds support for e2e parallelization
Change-Id: I9af281bc40223a5ceb2a6f71ce247970beea4b02
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116050
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-25 16:45:33 +00:00
Peter Marshall 9b878ab0ab [ui] Add a border to text input on Workspace settings tab
The border was only shown on hover, which on a white background is
confusing as there is no indication it's a text input.

Normally these inputs are on a grey background so the border isn't
needed until hover.

Before: https://imgur.com/xuN2Q2J
After: https://imgur.com/RC35CLI

Fixed: chromium:1060513
Change-Id: Ic21652f652710042d3a7611a70b5d0837383f816
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119687
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2020-03-25 16:40:03 +00:00
Mathias Bynens 88e8f15748 Enable no-case-declarations lint rule
Lexical declarations in `case` and `default` clauses are a footgun,
since they are visible in the entire switch block, but they only
get initialized upon assignment, which only happens if the relevant
`case` is actually reached.

To ensure that such lexical declarations only apply to the current
`case` (which is usually the intention), `case` clauses containing
them should be wrapped in curly braces to create an explicit block.

More information:
https://eslint.org/docs/rules/no-case-declarations

Change-Id: I63d9341fcd76d4b9ce8281bd0e6573b886577f08
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119685
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-03-25 15:26:13 +00:00
Sigurd Schneider e07f9eed89 [issues] Generate COEP releated issues in the front-end
As back-end changes are being blocked, we opted to implement issue
generation for COEP in the front-end only for now, and will move it
to the back-end at a later point in time.

This CL adds an issue generator in the front-end that scans network
activity and identifies COEP issues, filing issues for each of them.

Screenshot: https://imgur.com/a/4spYE4d

Change-Id: I1d9baed1bc996efb94bcf0bab5cddde8dbbbe904
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2118096
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-03-25 14:38:43 +00:00
Changhao Han 218c5d61fb add aria-label for styles section
Add aria-label for styles section in the format of:
`${}, css selector`
to follow accessibility naming guidelines.

Bug: chromium:1064472
Change-Id: I03fb7137ca8e49e048a404f11093b7ee3a265837
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119670
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2020-03-25 14:05:43 +00:00
Simon Zünd 0ac782dd13 [issues] Show affected network requests in issues
Issues can not only have cookies associated with them, but also
network requests. Requests are already linked up to corresponding
issues so this CL only implements the UI for them.

R=sigurds@chromium.org

Change-Id: Ib1bc600e52bec2669073c4faca1f2ee2512f633c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119676
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-03-25 14:04:13 +00:00
Eric Leese 187e11502b Reland "Deduplicate tabs with same URL"
This is a reland of 559b867f57

Original change's description:
> Deduplicate tabs with same URL
> 
> Opening the same file in multiple workers results in only one copy
> open. Further deduplication work in the BreakpointManager results
> in disabled breakpoints being visible in all workers.
> 
> Bug: chromium:670180
> Change-Id: I57c7cf2aab46dcc2dc9d6622819df55bdd75d0a2
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107522
> Commit-Queue: Eric Leese <leese@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

Bug: chromium:670180
Change-Id: I48ef449a48c41413287bdd969510659e59c9663b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116436
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2020-03-25 13:42:23 +00:00
Simon Zünd c97591098b [network] Add filter for the path attribute of a cookie
This filter is used by the Issues panel when we want to filter for
all the network requests that set a specific cookie.

R=sigurds@chromium.org

Change-Id: I4139ad029379dfefd97e6fdcd096fbcc23e55eaf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119678
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-25 13:28:03 +00:00
Tim van der Lippe 92ec92a338 Add documentation for GN-Typescript integration
Now that we have a stable implementation of our GN-Typescript integration,
add a README with basic usage and implementation details of it.

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

Bug: 1011811
Change-Id: I25a11b3483d306ae359c4bf11ecc34fcbff8fd6e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2112367
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-25 13:19:13 +00:00
Tim van der Lippe 1917f69eda Add test that verifies dependencies rebuild dependents
A change in a deps will rebuild the dependent libraries as well.

R=jacktfranklin@chromium.org

Bug: 1064287
Change-Id: I2d41528d0ba725c8cb02d200c0ab8350b08193fa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119680
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-25 13:14:13 +00:00
Tim van der Lippe 7fe14d1f68 Check recompilation works when files change
It is now possible to make a change in a file and verify that the incremental
compilation is successful.

R=jacktfranklin@chromium.org

Bug: 1064287
Change-Id: Ia9fdd17804fba68e850133aba64026f3157bbcdd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119679
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-25 13:11:33 +00:00
Tim van der Lippe 2ffbc3f6d5 Check Ninja output with expected build output
We now check that the build_output.txt is equivalent to the build_output.txt.expected.
This includes compilation failures, which `compilation_failure_front_end` shows.

To be able to have machine-agnostic buildoutputs, the toolchains need to be
absolutely referenced and thus every fixture needs the same copy of a toolchain.
Also, the ts_library print must use the relative path rather than the absolute path.

R=jacktfranklin@chromium.org
DISABLE_THIRD_PARTY_CHECK=Add ts_library tests.

Bug: 1064287
Change-Id: I4a4db566cc155b7f6e73cadc2efcfa8d615286ed
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2118097
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-25 13:06:03 +00:00
Philip Pfaffe bd22e62bdc Add a cxx+dwarf e2e test using the symbol server
Test the cxx+dwarf plugin the same way as the mock plugin, but using the
symbol server. To run the test, the server must be running, and the
environment variable WITH_SYMBOL_SERVER needs to be set.

Change-Id: I4d021f6fdea120e78fa02fdcb154b3c37bd4b4c3
Bug: chromium:1042636
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2112356
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-25 11:07:03 +00:00
Philip Pfaffe c2e5f79687 Only send module binary to symbol server if it has embedded symbols
This improves performance a lot by not serializing and transferring
modules that can't be handled by the server anyways.

Change-Id: If409b4e3e1f48c120ca94cf2e4e329844eefa3aa
Bug: chromiume:1042636
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2062369
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2020-03-25 10:42:43 +00:00
Mathias Bynens 4e1cc676b6 Reland "Enable emulating locales"
This reverts commit 012f9c0fc7.

Reason for revert: upstream web test is now temporarily disabled
https://chromium-review.googlesource.com/c/chromium/src/+/2119533

Original change's description:
> Revert "Enable emulating locales"
>
> This reverts commit a36992378f.
>
> Reason for revert: https://ci.chromium.org/p/chromium/builders/try/mac-rel/333856?
>
> Original change's description:
> > Enable emulating locales
> >
> > This patch adds support for emulating locales through the Sensors
> > drawer. Similar to timezone emulation, it’s tied to geolocation
> > emulation, completing the “user location emulation” feature set.
> >
> > Locale emulation affects:
> >
> > - *.prototype.toLocaleString
> >   e.g. `123_456..toLocaleString()`
> > - Intl.* APIs
> >   e.g. `new Intl.NumberFormat().resolvedOptions().locale`
> > - navigator.language
> > - navigator.languages
> > - the Accept-Language HTTP header
> >
> > Note that until chromium:1057096 gets fixed, updates to
> > `navigator.language` and `navigator.languages` are not visible
> > immediately, but only after the next navigation/page reload.
> >
> > Changes to the `Accept-Language` HTTP header are only reflected
> > for subsequent requests (but that’s unsurprising).
> >
> > Once chromium:1051186 is fixed, we can simplify the implementation
> > by dropping the call to Emulation.setUserAgentOverride.
> >
> > Boring but useful test/demo pages:
> > - https://mathiasbynens.be/demo/locale
> > - https://mathiasbynens.be/demo/locale#includeExtras
> >
> > Demo video: https://www.youtube.com/watch?v=lZEFwACYPo0
> >
> > Design doc: https://goo.gle/devtools-locale-emulation
> >
> > Bug: chromium:1051186, chromium:1051822, chromium:1057096
> > Change-Id: I0371f450ed23511816941f3a59c14236aea64408
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082371
> > Commit-Queue: Mathias Bynens <mathias@chromium.org>
> > Reviewed-by: Changhao Han <changhaohan@chromium.org>
>
> TBR=mathias@chromium.org,changhaohan@chromium.org
>
> Change-Id: Iffcacdb304aa107c787266e07dca87cadbe79337
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1051186, chromium:1051822, chromium:1057096
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116238
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>

TBR=yangguo@chromium.org,mathias@chromium.org,changhaohan@chromium.org

Cq-Depend: chromium:2119533
Change-Id: I003287fd4524dd88aceac0dbfb7e88e90f26b03f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1051186, chromium:1051822, chromium:1057096
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119672
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-03-25 09:44:42 +00:00
Benedikt Meurer f450d479cd Add petermarshall@ to OWNERS.
Change-Id: Ibbd5b9c526c0b890a54f5b92f2b2d0cc3873f8f3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2115632
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2020-03-25 08:26:23 +00:00
Simon Zünd c6a4eddf52 [issues] For affected cookies we link to corresponding requests
Cookie issues list affected cookies. When the user clicks on an
individual affected cookie, we now open the Network panel and filter
for all requests that set or want to set this cookie.

The old link simply navigated to the general Application > Cookies
pane, which didn't show anything.

R=sigurds@chromium.org

Change-Id: I8c4fcc0422f81d505ec82c9e8919537b3ac17c8b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119674
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-25 08:15:33 +00:00
devtools-ci-autoroll-builder 8c53b6f52b Update DevTools DEPS.
Rolling build: https://chromium.googlesource.com/chromium/src/build/+log/8d56e63..de373bb

Rolling third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools/+log/8f41598..e3a49aa

TBR=machenbach@chromium.org,liviurau@chromium.org

Change-Id: I99750468be79a0dc523e04edf410a136af816321
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2119591
Reviewed-by: Devtools Autoroller <devtools-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Devtools Autoroller <devtools-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
2020-03-25 03:20:32 +00:00
Michael Liao cdbe45e832 [Elements Panel]: Accounting for case where resolvedNode is null
Issue:
- onNodeResolved can take in a null parameter, but does not account for that in the function


Changes:
- Adding a check for currentNode before trying to access its parentNode parameter
Change-Id: I5f23943c9663126be03ce286eb55eaa1f9070bee
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2117365
Reviewed-by: Shane Clifford <shanejc@microsoft.com>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2020-03-24 21:54:23 +00:00
Yang Guo 012f9c0fc7 Revert "Enable emulating locales"
This reverts commit a36992378f.

Reason for revert: https://ci.chromium.org/p/chromium/builders/try/mac-rel/333856?

Original change's description:
> Enable emulating locales
> 
> This patch adds support for emulating locales through the Sensors
> drawer. Similar to timezone emulation, it’s tied to geolocation
> emulation, completing the “user location emulation” feature set.
> 
> Locale emulation affects:
> 
> - *.prototype.toLocaleString
>   e.g. `123_456..toLocaleString()`
> - Intl.* APIs
>   e.g. `new Intl.NumberFormat().resolvedOptions().locale`
> - navigator.language
> - navigator.languages
> - the Accept-Language HTTP header
> 
> Note that until chromium:1057096 gets fixed, updates to
> `navigator.language` and `navigator.languages` are not visible
> immediately, but only after the next navigation/page reload.
> 
> Changes to the `Accept-Language` HTTP header are only reflected
> for subsequent requests (but that’s unsurprising).
> 
> Once chromium:1051186 is fixed, we can simplify the implementation
> by dropping the call to Emulation.setUserAgentOverride.
> 
> Boring but useful test/demo pages:
> - https://mathiasbynens.be/demo/locale
> - https://mathiasbynens.be/demo/locale#includeExtras
> 
> Demo video: https://www.youtube.com/watch?v=lZEFwACYPo0
> 
> Design doc: https://goo.gle/devtools-locale-emulation
> 
> Bug: chromium:1051186, chromium:1051822, chromium:1057096
> Change-Id: I0371f450ed23511816941f3a59c14236aea64408
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082371
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Reviewed-by: Changhao Han <changhaohan@chromium.org>

TBR=mathias@chromium.org,changhaohan@chromium.org

Change-Id: Iffcacdb304aa107c787266e07dca87cadbe79337
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1051186, chromium:1051822, chromium:1057096
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116238
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2020-03-24 19:25:12 +00:00
Tim van der Lippe f83fad25ac Add ts_library test fixture
This adds a simple test fixture that uses `testonly = true` and verifies
that it cleanly compiles with Mocha + Chai.

I then realized we have to have a separate `.gn` and `BUILDCONFIG.gn`
for each test fixture, as otherwise there are clashes with file
outputs.

R=jacktfranklin@chromium.org

Bug: 1064287
Change-Id: I7c97061a1e1dd43f2b3215e4be11eaad0f453da0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2118095
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-24 16:11:12 +00:00
Jack Franklin 386469ab50 Add e2e test for event listeners in Elements Panel
This will eventually be fleshed out and replace the legacy layout
test [1].

[1]: http/tests/devtools/elements/event-listener-sidebar.js

Bug: 1044632
Change-Id: I92bf86dfb4686e985eba7baad1b6fe73c9ea159d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116441
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-24 16:03:23 +00:00
Sigurd Schneider 115f2bbd67 [issues] Apply new issue layout and styling
This applies the new layout and styling to the issues. The only thing
missing is the blue color theme, which will be added later when we have
the svg icon in place.

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

Bug: chromium:1057979
Change-Id: I5a7f733c6930b6617d3f7b3fa7520cbabdb9c283
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2118091
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-03-24 15:53:52 +00:00
Tim van der Lippe 385a9b7719 Add initial test fixture for ts_library
This will be used to catch regression tests in the ts_library GN integration.

R=jacktfranklin@chromium.org

Bug: 1064287
Change-Id: I540a243d63ee70c31ad913c648222221ea18b338
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2118094
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-24 15:52:12 +00:00
Mathias Bynens 18ebd5e760 Correct strings for the Issues panel
Change-Id: Id1b5a4c414eda377bfdf73a02115dd676bcc57dc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2118093
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-03-24 15:30:42 +00:00
Simon Zünd cd41af03bd [issues] Show reload InfoBar when issues might be incomplete
For complete and accurate issues, DevTools needs to be active while a
page is loaded. Should the {IssuesModel} not have observed such a
corresponding navigation event, we notify the user that a reload might
be a good course of action.

Screenshot: https://imgur.com/a/3aCDwV2

R=sigurds@chromium.org

Bug: chromium:1060628
Change-Id: I61d5deb1adfe71b392cd25571ce771d820c7b012
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116440
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-03-24 13:50:52 +00:00
Mathias Bynens 78e65946c6 Use consistent verbs in test helper names
- {obtain,get} => get
- {ensure,assert} => assert

As a drive-by fix, this patch also attempts to make the camel-casing
consistent for cases where the helper name contains an abbreviation
which would be fully uppercased when used separately.

Change-Id: I14c18bc17bd8a4ce0d2030c53145b8d4b2eae60d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116449
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-03-24 13:46:02 +00:00
Mathias Bynens 0a48503ad6 Simplify test resources
Test resources should act as minimal repro cases: they should be as
small and simple as possible, without any unnecessary code that
distracts from what’s important.

This patch applies that thinking to the existing test resources, with
only a few exceptions for 1) descriptive <title>s and 2) the mandatory
license headers.

This came up during review of [1].

[1]: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107525

Change-Id: I1081bb06129d2b6ce98daf1349d20b2bf2fd9401
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116445
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-03-24 12:55:22 +00:00
Sigurd Schneider 874023b2a0 [issues] Introduce RelatedIssue for associating issues with objects
This introduces a mechanism to associate issues with other objects in
DevTools such as NetworkRequests. Whether an issue is associated may
be used for, e.g., filtering or providing links to the issue.

Bug: chromium:1057979
Change-Id: I208ac146b1f576a19d377f29adf266cacc1ef091
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116439
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-03-24 12:53:52 +00:00
Mathias Bynens a36992378f Enable emulating locales
This patch adds support for emulating locales through the Sensors
drawer. Similar to timezone emulation, it’s tied to geolocation
emulation, completing the “user location emulation” feature set.

Locale emulation affects:

- *.prototype.toLocaleString
  e.g. `123_456..toLocaleString()`
- Intl.* APIs
  e.g. `new Intl.NumberFormat().resolvedOptions().locale`
- navigator.language
- navigator.languages
- the Accept-Language HTTP header

Note that until chromium:1057096 gets fixed, updates to
`navigator.language` and `navigator.languages` are not visible
immediately, but only after the next navigation/page reload.

Changes to the `Accept-Language` HTTP header are only reflected
for subsequent requests (but that’s unsurprising).

Once chromium:1051186 is fixed, we can simplify the implementation
by dropping the call to Emulation.setUserAgentOverride.

Boring but useful test/demo pages:
- https://mathiasbynens.be/demo/locale
- https://mathiasbynens.be/demo/locale#includeExtras

Demo video: https://www.youtube.com/watch?v=lZEFwACYPo0

Design doc: https://goo.gle/devtools-locale-emulation

Bug: chromium:1051186, chromium:1051822, chromium:1057096
Change-Id: I0371f450ed23511816941f3a59c14236aea64408
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082371
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2020-03-24 12:43:32 +00:00
Sigurd Schneider 18c9c50edf [issues] Improve type discipline in IssueRevealer
Bug: chromium:1051466, chromium:1057979
Change-Id: Idc9b30dca99f23de881521e94b3268f88021b1d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116446
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-03-24 12:32:12 +00:00
devtools-ci-autoroll-builder d8467c714f Update DevTools DEPS.
Rolling build: https://chromium.googlesource.com/chromium/src/build/+log/26e9d48..8d56e63

Rolling third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools/+log/2b2aec6..8f41598

TBR=machenbach@chromium.org,liviurau@chromium.org

Change-Id: If9da5da078e321db2a704c189c39352247d70370
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2117400
Reviewed-by: Devtools Autoroller <devtools-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Devtools Autoroller <devtools-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
2020-03-24 12:21:42 +00:00
Tim van der Lippe 6021e3e22e Automatically fix imports with missing file extensions
Missing file extensions are a runtime error in the browser, even though
TypeScript accepts imports without a file extension.

R=jacktfranklin@chromium.org

Bug: 1011811
Change-Id: I5c5abac2c45be7c8151340cc3981c74c89e96fb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116444
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-24 12:19:42 +00:00
Tim van der Lippe 44d389ace1 Relax import style rules for inner-module imports
Since imports within a module can be of any style, relax the rules
to also allow `import * as` for all files, not only ARIAutils.js

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

Change-Id: I9cd8973176c200c72a6009496e07404b959435a6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116442
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-24 11:28:42 +00:00
Tim van der Lippe 98583637e9 Add README for end-to-end tests
The shared README should be done in a follow-up, as it requires additional
documentation in the `helper.ts` functions as well.

R=aerotwist@chromium.org

Change-Id: I665c9f07b8002fb395b7de2b202d1589472366db
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2115634
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-03-24 11:09:12 +00:00
Mathias Bynens f021bbb3a0 Bump settings version
A Lighthouse CL [1] added `_updateVersionFrom28To29` logic but didn’t
update the version number from `28` to `29` along the way.

This patch fixes that to unblock additional update logic which depends
on versioning.

[1]: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056866

Bug: chromium:1052111, chromium:1051186, chromium:1051822, chromium:1057096
Change-Id: Ie8512ecd755aa533287c78c8f3c0449e8f8a9b48
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2115635
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-03-24 06:33:02 +00:00
devtools-ci-autoroll-builder c01b1d98a3 Update DevTools Chromium DEPS.
TBR=machenbach@chromium.org,liviurau@chromium.org

Change-Id: Iefc946bd75961453562df734472e8ebf28f8ab15
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2117394
Reviewed-by: Devtools Autoroller <devtools-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Devtools Autoroller <devtools-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
2020-03-24 04:11:41 +00:00
devtools-ci-autoroll-builder 31f1f037b6 Update DevTools DEPS.
Rolling build: https://chromium.googlesource.com/chromium/src/build/+log/57e2e39..26e9d48

Rolling buildtools: https://chromium.googlesource.com/chromium/src/buildtools/+log/4164a30..7977eb1

Rolling buildtools/linux64: git_revision:9499562d94bf142f43d03622492e67b217461f67..git_revision:5ed3c9cc67b090d5e311e4bd2aba072173e82db9

Rolling third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools/+log/befc299..2b2aec6

TBR=machenbach@chromium.org,liviurau@chromium.org

Change-Id: Ibc30e684e8eff8b8525a7381f97b299668ee8b48
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116853
Reviewed-by: Devtools Autoroller <devtools-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Devtools Autoroller <devtools-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
2020-03-24 03:13:41 +00:00
Michael Liao 32f6f55c06 [JavaScriptAutocomplete]: Fixing unhandled exception when compileScript returns null
Issue:
- JavaScriptAutocomplete.isExpressionComplete calls RuntimeModel.compileScript
- When RuntimeModel.js hits an InspectorBackend.ProtocolError, it returns null
- isExpressionComplete doesn't handle the null case and checks result.exceptionDetails causing an unhandled exception

isExpressionComplete: https://cs.chromium.org/chromium/src/third_party/devtools-frontend/src/front_end/object_ui/JavaScriptAutocomplete.js?type=cs&q=if+(!result.exceptionDetails)+-f:out+file:JavaScriptAutocomplete.js&sq=package:chromium&g=0&l=676
compileScript: https://cs.chromium.org/chromium/src/third_party/devtools-frontend/src/front_end/sdk/RuntimeModel.js?type=cs&q=RuntimeModel.compileScript+-f:out&sq=package:chromium&g=0&l=265

Changes:
- Add null case to isExpressionComplete
Change-Id: I5c54310c465f588a00f5678da9fc625629c532c6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2111359
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
2020-03-24 03:03:11 +00:00
Eric Leese 0769db92d4 Revert "Deduplicate tabs with same URL"
This reverts commit 559b867f57.

Reason for revert: Blocking autoroller due to broken test.

Original change's description:
> Deduplicate tabs with same URL
> 
> Opening the same file in multiple workers results in only one copy
> open. Further deduplication work in the BreakpointManager results
> in disabled breakpoints being visible in all workers.
> 
> Bug: chromium:670180
> Change-Id: I57c7cf2aab46dcc2dc9d6622819df55bdd75d0a2
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107522
> Commit-Queue: Eric Leese <leese@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

TBR=yangguo@chromium.org,szuend@chromium.org,leese@chromium.org

Change-Id: I4d91c5f1a7d66a4b18cb12b23f17107091de7004
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:670180
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116435
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2020-03-23 22:51:51 +00:00
Michael Liao c182e9440b [Elements - Accessibility Pane]: Adding more intuitive keyboard navigation to Accessibility tree
Issue:
- Accessibility tree in Elements pane has unusual keyboard navigation

Before:
- Up Arrow -> select previous
- Down Arrow -> select next
- Left Arrow -> select previous
- Right Arrow -> select next
- Enter -> inspect node
GIF: https://imgur.com/NMOnRkW

After:
- Up Arrow -> select previous
- Down Arrow -> select next
- Left Arrow ->
	if on node with expanded children -> collapse children
	if on node with no expanded children -> select parent
- Right Arrow
	if on node with children -> inspect node (expands children)
	if on node without children -> nothing
- Enter -> inspect node
GIF: https://imgur.com/EP1B055

Bug: 963183
Change-Id: I9f862ba6a94980afbfbb0eaf807fd3b85d51d3e7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2101371
Reviewed-by: Tony Ross <tross@microsoft.com>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2020-03-23 21:55:41 +00:00
Michael Liao b86ab61ad3 [Elements - Event Listeners]: Add context menu item to reveal nodes in DOM
Issue:
- DOM Nodes in the Elements' Event Listeners pane are not clickable for keyboard users

Changes:
- Added context menu item "Reveal in DOM tree" that does the same function as clicking on the node

GIF:
https://imgur.com/ZZmCmCn

Bug: 963183
Change-Id: If59b7a0d17d2f3e2ab362649a81f1f051173ba75
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2103117
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2020-03-23 21:22:51 +00:00
Michael Liao 6cd4998e16 [Pie Chart]: Implementing Keyboard Nav and SR functionality to pie charts
Previous Pie Chart Discussion about Keyboard Nav in this CL:
https://chromium-review.googlesource.com/c/chromium/src/%2B/1607140

GIF Fixed:
https://imgur.com/a/Qpb0dSJ

CSS Margin Fix for border
Before: https://imgur.com/68QmkOa
After: https://imgur.com/WUkTt1P

Bug: 963183
Change-Id: I62890563111ffcd87e3291aec69b96ccab814f47
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2083909
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-03-23 21:03:11 +00:00