Commit Graph
27 Commits
Author SHA1 Message Date
Christy Chen cac3f1096e [Loc] Migrate network to localization V2
Migrate network panel
Tested with en-XL: https://imgur.com/a/7F7vWv4


Bug: 1136655
Change-Id: Idd0ab59e021a2be919ceca1def21537d6d25607d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2662325
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-02-03 10:44:54 +00:00
Sigurd Schneider 57654f96e3 Import ls in NetworkConfigView
Bug: chromium:1136655
Change-Id: I7ea33934c1743fded49c2ff0dbe479c0425ea769
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2626300
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-15 08:07:05 +00:00
Andres Olivares 70b668a4fd [module.json extensions] Migrate network views
Bug: 1134103
Change-Id: I3bcc8c238bf0ec2734236777ed696067846aa7a3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2577165
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-10 17:14:28 +00:00
Tim van der Lippe 70842f313f Replace title property setter with Tooltip install invocation
ui/Tooltip.js overrides the HTMLElement prototype to override the
title property. Rather than using this property, we shoul be
calling Tooltip.install directly. This makes sure that new
components are not relying on the behavior of the legacy
prototype patching.

These usages have been manually audited using the following regexes:

Search: ([\S]+)\.title = ([^;]+);
Replace: UI.Tooltip.Tooltip.install($1, $2);

Note that there are classes in DevTools that also have a title
property. Most notably `TreeElement`. We should not be replacing
these, as they do not inherit from HTMLElement. Luckily, we are
running TypeScript to make sure we don't call `Tooltip.install`
with a non-HTMLElement.

A follow-up CL will clean up the getters.

R=jacktfranklin@chromium.org

Bug: 1150762
No-presubmit: True
Change-Id: I5928e75c70293531849e0576f4fb2a2a8b3e02d2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2555060
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-23 17:16:46 +00:00
Jack Franklin 71519f8efb Introduce enableLegacyPatching flag for CSS patching
As part of the dark mode migration we are adding
`enableLegacyPatching:true` to all call sites of `appendStyle` (and
related methods). If a user passes `false` for that flag, no CSS colour
patching will occur.

This CL is therefore a no-op from a user's perspective as we pass `true`
on every call to maintain existing behaviour, but once we start
migrating we will turn the option to `false`. Long term, once all code
is migrated and the old patching is removed, we will remove this flag
entirely once again.

Bug: 1122511
Change-Id: I76b818e83b7d5ee0175e1548759373f53481e0ab
No-Presubmit: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2516345
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-03 14:11:46 +00:00
Simon Zünd 60b4a1a227 [ts] Type-check network/NetworkConfigView.js with TypeScript
R=jacktfranklin@chromium.org

Bug: chromium:1011811
Change-Id: I113d60176367d3fda1c903034494d96a897b9025
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2460910
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-10-08 10:47:37 +00:00
Jan Scheffler 6c0cc69f17 Migrate front_end/network to devtools_entrypoint
R=aerotwist@chromium.org, jacktfranklin@chromium.org

Bug: 1101738
Change-Id: Id895c6e1a9083c22334ae1afad467c08e8dfa6a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2332228
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
2020-07-31 14:44:50 +00:00
Tim van der Lippe cd0bb373d1 [global] Remaps SDK.multiTargetNetworkManager
R=aerotwist@chromium.org

Bug: 1058320
Change-Id: Icb43c143ef0ca14bd3c9280cc5096862c892d030
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2173373
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-05-04 10:24:11 +00:00
Tim van der Lippe f49e23286b Replace single class invocations of createElementWithClass
This applies the following replacement to the codebase:

(\S+) = createElementWithClass\('(\w+)', '([^'\s]+)'\);

to

$1 = document.createElement('$2');\n$1.classList.add('$3');

R=aerotwist@chromium.org

No-Presubmit: true
Bug: 1011811, 1077215
Change-Id: I0d76b39f1ed8cd4a44f18f94e398db934ba4b09c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2176112
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-05-01 16:54:52 +00:00
Paul Lewis 2d7d65c5e8 [global] Remaps self.Common.settings
This CL changes references to self.Common.settings (the global
instance of SDK.Common.Settings) over to
Common.Settings.Settings.instance(). To keep both TypeScript and
Closure happy we must make a method on the Settings class itself,
since it only allows private constructors to be accessed by static
methods on the class.

Bug: 1058320
Change-Id: I04afc8caf64acf29cdda13ef03ad05cfff4786a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2091450
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-16 22:04:07 +00:00
Tim van der Lippe 0ed1d2b857 Migrate network/ to import cross-module
Bug: 1006759
Change-Id: I3fc6be48f30ca087b6396cb046c0fbc0f43e018f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2035946
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-04 18:12:02 +00:00
Paul Lewis 5a922e78b5 [Global] Update refs to SDK.multitargetNetworkManager
Bug: 1006759
Change-Id: Id9152c0982e46484e0254ef9559bedad62e1bc6e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2017146
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-24 12:30:58 +00:00
Paul Lewis 4b64b3f263 [Global] Remap refs to Common.moduleSetting
Bug: 1006759
Change-Id: Ia45ef0fd0b97588ca23a8d784c0564050b0bbf4c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016748
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 12:00:20 +00:00
Paul Lewis 6bcdb18044 [Global] Update refs to Common.settings
Bug: 1006759
Change-Id: Ie1943b50ba8ba23fae4f52f958ae6f8c7b6a7d3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016744
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 11:29:11 +00:00
Tim van der Lippe 119690cd73 Migrate network/ to ESM internally
Bug: 1006759
Change-Id: I90014b2af71ca1945cb8bcfe011bb5d34874b258
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1994979
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-14 14:47:58 +00:00
Paul Lewis 5650965324 Migrates network/ to esm
Bug: 1006759
Change-Id: Ic94d5954605d7d368dfe395532c92a98dfee7a3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953615
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-12-09 11:08:02 +00:00
Mathias Bynens fbf3696106 Update various Network Conditions User-Agent strings
CL that temporarily disables the relevant Blink Web Test:
https://chromium-review.googlesource.com/c/chromium/src/+/1948883

Bug: chromium:1029031
Change-Id: I036898cf1a01b58741c1deb67d09ec64905cbd02
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947533
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
2019-12-04 09:26:05 +00:00
Mathias Bynens d569806669 Update Network Conditions User-Agent strings for Safari
CL that temporarily disables the relevant Blink Web Test:
https://chromium-review.googlesource.com/c/chromium/src/+/1948883

Bug: chromium:1029031
Change-Id: I155747a0785da58c8b348bc8c217a5c652e3ff44
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1944335
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2019-12-04 09:18:35 +00:00
Zoe Clifford 0734a8b8c0 Update Googlebot User-Agent
webmasters.googleblog.com/2019/10/updating-user-agent-of-googlebot.html
describes that Google is updating their Googlebot User-Agent to report
the Chrome/%s version used (which will roughly update at the same time
as Chrome stable).

So devtools' Googlebot UA shouldn't used a fixed version either. Replace
it with %s so it matches the version number Chrome was built with.

This won't always exactly match the UA used by Google, but is probably
the closest we can reasonably get.

While I'm here I also add a third "Googlebot Desktop" User Agent
to mirror the smartphone one. (See "Googlebot user agents today" in the
above link)

Note that I plan to submit this change without coordinating the timing
with the internal UA change rollout. This means there will be a period
of time where the UA in devtools doesn't match the UA used by google.

Bug: 984733
Change-Id: I68a0d5549fab70d0ce8e37e9f518b5a0aead68eb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1949544
Commit-Queue: Zoe Clifford <zoeclifford@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
2019-12-03 23:35:32 +00:00
Mathias Bynens f05ffb295a Update Network Conditions User-Agent strings for Firefox
Bug: chromium:1029031
Change-Id: Idf68bbda1b3a92fb3d78da8a9ce85199a25bbdc2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1944334
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2019-11-29 14:19:22 +00:00
Michael Liao 9c1e0ce471 DevTools [Network Conditions]: adding error text for network condition tool custom user agent text input
Re-upload of https://chromium-review.googlesource.com/c/chromium/src/+/1730131 to DevTools repository

Changes:
- added error text div and needed css
- adding value length checks on creation and input

**Note: the text now reads "Custom user agent field is required"
Image of error text:
https://imgur.com/8PI75T3

GIF of error text behavior:
https://imgur.com/o8oZvcW

New error element spacing:
https://imgur.com/hE3Xmli

Bug: 963183
Change-Id: Ib5776ae72d4abaabf03efce5838ddb731283c0ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871820
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2019-10-23 20:24:47 +00:00
Tim van der Lippe 1d6e57a0e3 Always add braces to single-line if-statements
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
2019-09-30 11:55:34 +00:00
Christy Chen d0ae96c0b9 DevTools: Localize user agent dropdown menu in Network conditions tool
In the Network condition tools, user facing strings in the dropdown menu
of user agent options are not localized.

https://imgur.com/ZDp4j8D

In this change:
- adds ls() calls to those strings in NetworkConfigView.js.
- GRDP changes are generated automatically, with manually written descriptions
- Placeholders (<ph name="LOCKED_1">) are added in the grdp to prevent
translations of the branding related strings.


Bug: 941561
Change-Id: Ib274dd425733d0ef4f4199ff6334810f113ade27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816184
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Commit-Queue: Christy Chen <chrche@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#699434}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0f8efb4dd92869f559add716ff959724ed799ae5
2019-09-24 19:05:17 +00:00
Mike Jackson c8f2c9e659 DevTools: Update Microsoft Edge User Agents
Update the list of devices for Microsoft Edge. This includes:

 - Adding Microsoft Edge for all supported platforms
 - Clarified which ones are based upon EdgeHTML vs Chromium
 - Ensured that appVersion and Chromium version are patched similar to Chrome.

Change-Id: I59c5287799c6e9bd6950c76323a867c012951323
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1709693
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Mike Jackson <mjackson@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#685388}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7a0ed6f98a6fff9954d7ca823af149a6b5b56caf
2019-08-08 22:51:16 +00:00
Chandani Shrestha 13ec533908 DevTools: Make Network Conditions Accessible
Network Conditions drawer had following issues:
- Form controls like Network Throttling, User Agent combox box and input box was missing labels for screen reader users.
  This change addresses that issue by adding aria-label to them.
  Additionally, axe test is added for Network Conditions.

Tested keyboard navigation
- navigate up/down drop-down items using arrow keys
- Checkbox is checked/unchecked using space bar
- Tab into/out (no tab traps)

Tested screen reader
- reads checkbox label
- reads items selected from the drop down list

Bug: 963183

Change-Id: I7dec31f1c476f7c63ce4fff9a3b73c1b5377bfc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614138
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Chandani Shrestha <chshrest@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#666479}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8b1245ec9fbba1922502c22e50eb70648a8b33b6
2019-06-05 22:27:00 +00:00
Erik Luo 4da6ecb441 DevTools: update UC browser UA presets
Sources:
- Real Nexus 6P
- https://developers.whatismybrowser.com

Bug: 843414
Change-Id: I9face2da3b61b20e4f0051ba3cda518c0af9b049
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1558153
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#650061}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 871d4d369b663517800f979dc180e49ce014e458
2019-04-11 21:39:04 +00:00
Blink Reformat 4c46d0969f The Great Blink mv for source files, part 2.
Move and rename files.

NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: 768828
TBR=darin@chromium.org
NOTRY=true

Change-Id: I66d3b155808bc5bdbf237b80208e1e552bcf7f28
Reviewed-on: https://chromium-review.googlesource.com/1001153
Reviewed-by: Blink Reformat <blink-reformat@chromium.org>
Commit-Queue: Blink Reformat <blink-reformat@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549061}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0aee4434a4dba42a42abaea9bfbc0cd196a63bc1
2018-04-07 15:32:37 +00:00