* Enabled the check_localization presubmit script.
* Fixed localization issues caught by the check_localization presubmit script.
* Updated the check_localization script to allow contatenation of non-alphabetic strings with localized strings.
* For example, ls`Status Code` + ": " is a valid concatenation. This allows for decorations to be concatenated with localized strings.
Change-Id: I741940c9ebdac363ac0ccad3f7de20d508204e2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1544878
Auto-Submit: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#647134}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7a329cb73b0b5d5cddb89a34fd7da6cb1a3c87dd
After submiting accessbility fixes for the Sensors tool and Performance
Monitor, we should aim to not regress these improvements.
This change adds the AxeCoreTestRunner module which uses aXe to run
basic accessbility checks on the UI.
It also adds a test that runs aXe against the Performance Monitor and
Sensors tool since they have already received an initial accessibility
pass and are not reporting any violations in aXe.
Change-Id: I6443d5014d9200a9295746aaec7a71b4659a6417
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1534551
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Amanda Baker <ambake@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#645823}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f854b6f5a7a1e16fe5880c40e8055e92eca37943
This PR adds devtools frontend localizability check to the presubmit
script as reqeusted in
https://chromium-review.googlesource.com/c/chromium/src/+/1504254.
The new script, check_localizability.js, which run on frontend files
changed as part of the devtools presubmit check. In addition, you can
run $ npm run check-loc inside devtools/ to run the check on all
frontend js files.
**Note: Errors identified will be fixed and submitted as a separate
PR. **
check_localizability.js usage:
$ node check_localizability.js [-a | <.js file path>*]
-a: scan all devtools frontend js files
<.js file path>*: List of .js files with space-separated absolute paths
Localizability violations that it scans for:
- First argument to Common.UIString / UI.formatLocalized is not a string
- Conditional argument (e.g. cond ? trueCase : falseCase) found in
Common.UIString / UI.formatLocalized / ls tagged template literal
- String concatenation is used with
Common.UIString / UI.formatLocalized / ls``
- A specific argument to function is not localized (i.e. not wrapped in
Common.UIString / UI.formatLocalized / ls``)
- Currently, the script checks the third argument to createInput()
Here are a few examples of errors the script can output:
third_party\blink\renderer\devtools\front_end\resources\IndexedDBViews.js
Line 1456: string concatenation should be changed to variable
substitution with ls: ' (' + Common.UIString('Key path: ')
third_party\blink\renderer\devtools\front_end\timeline\TimelineUIUtils.js
Line 559-560: conditional(s) found in Common.UIString(
'%s [%s\u2026%s]', url, event.args['beginData']['startLine'] + 1,
endLine >= 0 ? endLine + 1 : ''). Please extract conditional(s) out
of the localization call.
Change-Id: I3243787ad5920b9b873f2feac7ed50a9c69bbe7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1524993
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#643161}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f1c8d4f5752ed8ab43babb602fa86121f8b14dbb
The launch_chrome.js npm script doesn't currently support the CHROMIUM_PATH variable like it does on other platforms.
This change simply copies the same logic from Linux/Mac.
Change-Id: Ic2a340f47b1dc87f9c7eefcdcf4de5ed39638c6e
Reviewed-on: https://chromium-review.googlesource.com/c/1481116
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#634800}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 363f1d8ba93a40c9bbebb277e7be807e4e6fffc0
This fixes a couple presubmit issues when running on Windows:
* check_gn didn't properly normalize paths
* eslint didn't execute in node successfully since the bin style for the
npm install was unix specific (it's a CMD file on Windows)
Bug: 929919
Change-Id: Iec7e1057254047bd0a6539e16df964dc8a58d528
Reviewed-on: https://chromium-review.googlesource.com/c/1459576
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#633810}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d2dcac5ced285df053bc094b8e36d80a998f0079
To make type checks using closure we generate protocol_externs, for
each domain we generate Protocol.${domainName}Dispatcher @interface.
SDK.${domainName}Dispatcher uses @implements with generated interface,
closure compiler in this case forces us to have all interface method
implemented.
Problem: when we try to add new event for one of V8 domains, we can not
add this notification and its implementation in the same CL, so closure
blocks landing new events in V8 domains.
We can resolve this problem by using @extends instead of @implements
for V8 domains. In this case closure will still check that if we
override something - we override it properly but allow us to not
override all events.
I tried this approach for Page domain as well since it contains a lot
of unused by DevTools events but my attempt failed because we have
SDK.ScreenCaptureModel. It implements dispatcher and extends model,
unfortunately closure does not support multiple inheritance and to
use @extends here we should extract dispatcher from ScreenCaptureModel.
R=dgozman@chromium.org
Bug: chromium:848849
Change-Id: I14fa87b53aeaff5bd7daea7dd36a6917688841cf
Reviewed-on: https://chromium-review.googlesource.com/1082594
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#563830}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 14157eee77965e191ec21af278bdcb2aecf9f08e
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
Sometimes a function would have multiple signatures in the IDL files
with the difference just being some of the arguments are optional.
This patch improves the deduplication logic to correctly support
array.splice(start, ?deleteCount, ...items)
Change-Id: Ie9230d54dadd1c8c7cadbb92afc37fbfa87ea857
Reviewed-on: https://chromium-review.googlesource.com/1062885
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#559342}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ddcb027a039f212e0701f7118ea7dd8b8cea65b4
This removes some features from UI.Fragment:
x-shadow
states
inline styles
It adds a simple helper method, UI.html which returns an element.
As a driveby, also fixes the jsdoc validator to parse spread operators.
Change-Id: I569f697bbe29530b7a494c75727dcf37769f8f05
Reviewed-on: https://chromium-review.googlesource.com/1050617
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#557049}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f16c32e015ddb7271389e6ede34cf49cce76bfbe