Commit Graph
25 Commits
Author SHA1 Message Date
Lorne Mitchell 7aa2c6c30f DevTools: Enabled check_localization presubmit script
* 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
2019-04-03 03:50:10 +00:00
Amanda Baker 06da915c02 DevTools: Add aXe test runner and accessibility test
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
2019-03-29 17:04:12 +00:00
Mandy Chen 465b4f7931 DevTools: Add devtools localizability check to presubmit
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
2019-03-21 22:52:54 +00:00
Joel Einbinder 75bb433138 DevTools: Fix argument hints for static constructor methods
The constructor name was not being passed correctly into the JSON,
which was causing static methods to be incorrectly parsed as
unique top level functions.

Bug: 913363
Change-Id: If0a94184cceef0c16b8755fe375aad3e2e48de0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1501495
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#637852}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 02ae595073a7336412d333ff58c4b4b3f144c736
2019-03-05 22:33:55 +00:00
Jeff Fisher 022a7ad5a5 DevTools: Support CHROMIUM_PATH on Windows
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
2019-02-22 20:19:06 +00:00
Jeff Fisher a1d0db6496 DevTools: Fix presubmit scripts on Windows
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
2019-02-20 18:56:14 +00:00
Kent Tamura d3d3f0420d Fix "layout test" in comments in blink/{public,renderer}.
TBR=kinuko@chromium.org

Bug: 843412
Change-Id: I36cd63ab1c3b0b0541d458fa91d3b8c8759356f6
Reviewed-on: https://chromium-review.googlesource.com/c/1373049
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#615796}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fad2769a1af7e86f2d53a17e73439c8ae15142f7
2018-12-12 02:45:28 +00:00
Paul Irish c9966b889b DevTools: Roll Lighthouse to 4.0.0-beta
Bug: 772558
Change-Id: Ie1ef89f7a189687e600e5e22d376c53dac242079
Reviewed-on: https://chromium-review.googlesource.com/c/1355176
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#612481}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5a003efcc60d91c76003893a4e29d413fb9ffeda
2018-11-30 01:05:03 +00:00
Kent Tamura c464a2e9b7 The Great Blink mv for LayoutTests
This CL moves third_party/WebKit/LayoutTests to
third_party/blink/web_tests.

NOTRY=true
NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
TBR=robertma@chromium.org

Bug: 843412
Change-Id: Ibb588b93d1579bcd1cb68df0a50efd8653f8724f
Reviewed-on: https://chromium-review.googlesource.com/c/1328627
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#610740}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 77578ccb4082ae20a9326d9e673225f1189ebb63
2018-11-25 22:33:43 +00:00
Andrey Kosyakov 6e36adc7ed grit: support skipping entries in generated resource map
Bug: 899437
Change-Id: I4d6167d30a7b7014c17393960fce3ecb1470b80e
Reviewed-on: https://chromium-review.googlesource.com/c/1342778
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#609526}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e41a90785a4888a0cdbf0439113a7c37b8e47b37
2018-11-20 00:25:34 +00:00
Alexei Filippov 87e097d28b DevTools: Fix java version check.
Change-Id: I231ac01a72c90d4d6feac86ae8278590f3e494cf
Reviewed-on: https://chromium-review.googlesource.com/c/1315994
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#605775}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0548146dc408876427a82a136aca2c4b311c0df1
2018-11-06 19:18:29 +00:00
Joel Einbinder 5b2829a446 DevTools: Add a script to launch old versions of DevTools
This can be used for testing devtools_compatibility.js against various
older versions of DevTools.

Bug: 898245
Change-Id: I0eb15d1e4a1e893b97a7c9a77c2c80c7006068a2
Reviewed-on: https://chromium-review.googlesource.com/c/1298617
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#602806}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6ca23eae57e2021ff9a1899beba7b89f90b6673b
2018-10-25 18:32:44 +00:00
Xianzhu Wang 5f1d03734f [run_web_tests] Remove --pixel-test/--pixel-tests option
Whether a test produces pixel results should be decided by the test
itself. Controlling that outside of the test is unnecessary. Removing
it can greatly simplify our code.

This is a preparation to replace the ImageFirst feature with a better
solution (https://chromium-review.googlesource.com/c/chromium/src/+/1277654).

TBR=mkwst@chromium.org  # For simple passive changes

Bug: 703899
Change-Id: Ia04b622e24f88cf2408f20e5e6888d933e34dac5
Reviewed-on: https://chromium-review.googlesource.com/c/1277820
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Robert Ma <robertma@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#602139}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4ea14eb904e6d48aab3b9d635176e49c5fd68f3e
2018-10-23 22:29:13 +00:00
Johannes Henkel ff4efae492 [DevTools] Interpret 'binary' as 'string' on frontend
This means it's up to the client of the protocol layer to decode
the base64, just like before the introduction of 'binary'.

My overall WIP change is in here, and happy to explain more:
https://chromium-review.googlesource.com/c/chromium/src/+/1244719

Bug: chromium:891377
Change-Id: I60762ff2a815afe2bb0b69480340f1904a1d9909
Reviewed-on: https://chromium-review.googlesource.com/c/1281877
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#600039}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 719629d34caae2c98b184f4a3c96f6cf7edf2e05
2018-10-16 17:55:58 +00:00
Alexey Kozyatinskiy fac775ddde [DevTools] use @extends instead of @implements for RuntimeDispatcher
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
2018-06-01 22:18:50 +00:00
Joel Einbinder d2f2a75f0c DevTools: Fix hosted mode server 404 error
There was a missing comma that broke the hosted mode server

Change-Id: I240ba5dad5ce9508e163717935a525174a339e3c
Reviewed-on: https://chromium-review.googlesource.com/1073632
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#561974}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7421e23ba6ac4300889d60942719de07771adc5b
2018-05-25 19:39:28 +00:00
Alice Boxhall 4100355a04 Introduce ARIAProperties.json5
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
2018-05-21 03:33:56 +00:00
Joel Einbinder 705daf04ca DevTools: Deduplicate more function signatures for argument hints
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
2018-05-16 23:57:41 +00:00
Joel Einbinder 08b53b8dfd DevTools: Generate jsconfig.json from module.json
This makes VSCode a lot faster in the DevTools codebase by only
autocompleting over the files depended on by this file.

Change-Id: I94421969291a135a46673c02722e77f0d6709426
Reviewed-on: https://chromium-review.googlesource.com/1058680
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#558710}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 950b66e704654fe319225b5e1d2ac58f74cea0ce
2018-05-15 15:29:11 +00:00
Joel Einbinder 3f23eb2bdd DevTools: Argument hints for native functions
Change-Id: Ia0e9f3c98735d64a1188b4373c90b7ef2684ea48
Reviewed-on: https://chromium-review.googlesource.com/1054582
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#558527}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a5be1a79f122d4496aa4a09ddfad0b475d878248
2018-05-14 23:27:51 +00:00
Joel Einbinder 04ab0502be DevTools: Slim down UI.Fragment
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
2018-05-09 01:28:19 +00:00
Joel Einbinder 8922603110 DevTools: Switch dtrun test to use run_web_tests.py
Apparently run_layout_tests.py is being moved

Change-Id: I2ff85e0203d87d8dde8b0937830593fe1a1fb849
Reviewed-on: https://chromium-review.googlesource.com/1045177
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#556205}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8784c6281d5926ffd507a4fa3f8bc88830153baa
2018-05-04 21:36:12 +00:00
Alexey Kozyatinskiy a8011e0817 Roll third_party/inspector_protocol to 4d389ba
This roll includes:
  - [inspector_protocol] first class citizien .pdl support

+ migrated cros_protocol.json to .pdl

TBR=dgozman@chromium.org,dpranke@chromium.org,pfeldman@chromium.org
NOPRESUBMIT=true
Bug:none

Change-Id: I0fff1582bd41115e2aa348008c7a5d48f5c59a7e
Reviewed-on: https://chromium-review.googlesource.com/1014468
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#551382}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a42a629f67ac9aae0aaa8fbd912c654559c5d880
2018-04-17 17:49:38 +00:00
Dmitry Gozman 61ca9312a4 [DevTools] Fix dtrun after blink move
Bug: none
Change-Id: Ic29c5c2938e3d395fec9f9eb9097128770f5dc9d
Reviewed-on: https://chromium-review.googlesource.com/1002990
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549216}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e888abde237186de5eba0469099b527830bedb87
2018-04-09 17:42:03 +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