Commit Graph
21 Commits
Author SHA1 Message Date
Jack Franklin a75ae7cbb3 Enforce import type when importing TS types.
Bug: none
Change-Id: I02ef1182143b7fe091ce92d59f04ac2188903e0d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886925
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-05-11 14:00:22 +00:00
Alex Rudenko 651f6d3f3c Enable font editor tests and fix flakiness
The tests were relying on the order in which styles are rendered
in the styles panel. It appears that the order is not guaranteed at
least at some points in time. This CL updates the font editor
tests to click on a font editor button that exists in the element.style
section instead of clicking on any button that is found first.

Bug: chromium:1184658
Change-Id: I75de95462dd2d9dab1a4d99112685f682bbe80e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2780808
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2021-03-24 07:28:34 +00:00
Sigurd Schneider e7ecca5672 Disable flaky test in test/e2e/inline_editor/font-editor_test.ts
Examples:
https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/5913/overview
https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/5910/overview
https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Linux%20Official/280/overview

Bug: chromium:1184658
Change-Id: I711125bbed8829457b87f72dc8d2fc9216188f48
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2780807
Auto-Submit: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-03-23 15:09:39 +00:00
Alex Rudenko 3e3197db06 Fix and enable flaky color swatch tests
Also, refactored some related tests and element helpers.

Fixed: chromium:1184160
Change-Id: Ia48fc382d94ec179bbc106d36309dc50cbf2ab11
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2772052
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-03-22 14:55:54 +00:00
Sigurd Schneider bf712d5e92 Disable more tests from test/e2e/inline_editor/color-swatch_test.ts
Failure examples:
https://ci.chromium.org/p/devtools-frontend/builders/ci/Stand-alone%20Mac/3700
https://ci.chromium.org/p/devtools-frontend/builders/ci/Stand-alone%20Mac/3703
https://ci.chromium.org/p/devtools-frontend/builders/ci/Stand-alone%20Mac/3705

Bug: chromium:1184160
Change-Id: I87b1a42da997438b8ce33db7cd3a899723a5bd4d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2776016
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-03-22 09:48:12 +00:00
Sigurd Schneider 5b6c99e9e9 Revert "Speculatively increase timeout in before hook of e2e test"
This reverts commit 6e59e6f858.

Reason for revert: Wasn't effective.

Original change's description:
> Speculatively increase timeout in before hook of e2e test
>
> The before hook of test/e2e/inline_editor/font-editor_test.ts
> is timing out on bots. This might be a problem with a waitFor
> in the hook, or the timeout might be too low. This CL speculatively
> doubles the timeout so we can see whether it is due to the timeout.
>
> Bug: chromium:1184658
> Change-Id: Ie7696190f087dc57e9b263c5cae96827ea8cf433
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2744584
> Auto-Submit: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>

Bug: chromium:1184658
Change-Id: I4239681fa4a060e06b100b6037e95821c82c349b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2744046
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-03-10 08:14:30 +00:00
Alex Rudenko d553acd9ec Fix font editor test
Bug: chromium:1184658
Change-Id: Id2819f5115203310106805de55a71979fdfa6a5f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2744585
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2021-03-09 15:15:55 +00:00
Sigurd Schneider 6e59e6f858 Speculatively increase timeout in before hook of e2e test
The before hook of test/e2e/inline_editor/font-editor_test.ts
is timing out on bots. This might be a problem with a waitFor
in the hook, or the timeout might be too low. This CL speculatively
doubles the timeout so we can see whether it is due to the timeout.

Bug: chromium:1184658
Change-Id: Ie7696190f087dc57e9b263c5cae96827ea8cf433
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2744584
Auto-Submit: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-03-09 14:27:45 +00:00
Eric Leese 4a42826f13 Disable flaky e2e tests
Bug: 1184658, 1184627, 1184664
Change-Id: I2b4068a51bc60c133c48b5489227c3604675a48a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2735415
Auto-Submit: Eric Leese <leese@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-03-04 13:34:13 +00:00
Eric Leese aa9dfca154 Disabling flaky DevTools tests
Bug: 1184104, 1184162, 1184160
Change-Id: I779cd4f9cff2e3440c33bcea28db83fbfd327ef6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2731581
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2021-03-03 12:06:09 +00:00
Tim van der Lippe ed61abde18 Enable no-implicit-coercion ESLint rule for test/
R=jacktfranklin@chromium.org

Bug: 1082789
Change-Id: Ibb356637e115dc811c165fb0ad33a60a99105e79
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2595267
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-16 15:40:04 +00:00
Alex Rudenko 3c52c9aca3 Attempt at improving color swatch tests
Change-Id: I8bc2f1a7809155ff17050159dc5e46fde9fc4eb5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2578936
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-12-08 13:30:12 +00:00
Alex Rudenko 5d8bb6fc70 Fix flaky color swatch tests
Previously when ArrowDown was pressed it could happen that the body
tag was still collapsed. This lead to selecting the closing html
tag in the Elements panel instead of #inspected. This CL changes the
interaction to press ArrowRight two times that ensures that the body
tag is expanded and the #inspected element is selected.

Fixed: 1154590, 1149358
Change-Id: I0fbf4786713d115eb7018489d19cd78b1c0af7d3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2573359
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-12-04 07:47:19 +00:00
Michael Liao a92cf5ad8c Reland "[e2e]: Stabilizing Font Editor e2e test"
Issue:
- font editor e2e test is flaky
    - https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8861953632669108416/+/steps/E2E_tests/0/stdout
    - failures occur on tests that use keyboard presses to select from a dropdown menu
- failing e2e tests on mac builds

Changes:
- awaiting keyboard presses to make sure tests that rely on keyboard press and keyboard press order run as expected.
- changing e2e test interaction to be inclusive for all OS

Bug: 1154489
Change-Id: I8990a540030c9d48e006e01808a2f96a805aed86
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2571202
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-12-04 06:40:29 +00:00
Alex Rudenko 093915377a Revert "[e2e]: Stabilizing Font Editor e2e test"
This reverts commit d4be156e9f.

Reason for revert: Unfortunately, the tests are still flaky https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8861953632669108416/+/steps/E2E_tests/0/stdout

Original change's description:
> [e2e]: Stabilizing Font Editor e2e test
>
> Issue:
> - unexpected flaky failure for font editor e2e test
>     - specifically "the font editor is properly applying font family changes to the style section"
>
> Changes:
> - awaits focus call to avoid any timing issues for the subsequent keypresses
>
> Bug: 1154489
> Change-Id: Id95435b8552d64c9f224b2d56ed018cab5d40cd9
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2568872
> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>

TBR=michael.liao@microsoft.com,alexrudenko@chromium.org

Change-Id: Id609bca8ddc49225ace6ce6264ff66a852efb484
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1154489
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569774
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-12-03 08:48:44 +00:00
Michael Liao d4be156e9f [e2e]: Stabilizing Font Editor e2e test
Issue:
- unexpected flaky failure for font editor e2e test
    - specifically "the font editor is properly applying font family changes to the style section"

Changes:
- awaits focus call to avoid any timing issues for the subsequent keypresses

Bug: 1154489
Change-Id: Id95435b8552d64c9f224b2d56ed018cab5d40cd9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2568872
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-12-03 07:10:22 +00:00
Alex Rudenko d5071440f3 Disable flaky font editor e2e tests
Bug: 1154560
Change-Id: I67f4a2719f7bbd9e7bd0f1fdb7672ac9cddb4be5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567780
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-02 08:16:47 +00:00
Michael Liao 6035f4a583 [Font Editor Prototype]: Implements Experimental Typography CSS Editor in Styles Pane
Reference Document: https://docs.google.com/document/d/1zvmKDfdgVgL-QX2W4nKfgoeG_69YDF0AsLerIzL3rPE/edit?usp=sharing

Explainer: https://docs.google.com/document/d/1TmvbZuJR4fHuViE0X23y_1kUT43qt98mdj5GZxWf_W0/edit

Bug: 1093229
Change-Id: I0a8d049bd564a5ba547466067a12185565af7820
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2305613
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Songtao Xia <soxia@microsoft.com>
Reviewed-by: Tony Ross <tross@microsoft.com>
Reviewed-by: Shane Clifford <shanejc@microsoft.com>
2020-12-01 19:54:05 +00:00
Kim-Anh Tran 6d937e331f [e2e] Temporarily disable flaky color swatch test
TBR=patrick.brosset@microsoft.com

Bug: chromium:1149358
Change-Id: I028f34f62b0099ea4d029413ecced46a304685a9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2540348
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2020-11-16 14:26:08 +00:00
Patrick Brosset 6e337aa2fc Migrate 3 web_tests to the corresponding unit and e2e tests in frontend
While working on refactoring the color and var swatches recently, I had
to disable a few web tests in chromium.src.
Instead of fixing them and re-enabling them now, I'm taking this
opportunity to convert them to the appropriate unit or e2e tests in the
frontend (this helps reduce the dependency for frontend-only features on
chromium.src).

Here is the list of disabled web_tests and what I did for each:
1. third_party/blink/web_tests/http/tests/devtools/elements/styles-1/color-swatch.js
   Converted to both new unit and e2e test cases for what wasn't already
   covered.
2. third_party/blink/web_tests/http/tests/devtools/elements/styles/url-color-swatch.js
   Added new e2e test cases for what wasn't already covered.
3. third_party/blink/web_tests/http/tests/devtools/elements/css-variables/color-swatch.js
   Also added new e2e test cases to cover this.
3. third_party/blink/web_tests/http/tests/devtools/sources/color-swatch-position.js
   This one is different as it tests editing CSS code in the Sources
   panel. Because the current e2e helpers lack support for this, I will
   fix and re-enable this web_test in chromium.src. It doesn't seem
   worth it right now to create a bunch of new helpers just for the
   color swatch. But we should do this too eventually.

Backend CL: https://chromium-review.googlesource.com/c/chromium/src/+/2507510/

Bug: 1137438
Change-Id: Ic260e460ba215dd9a317ae2843d927c2d1bace3d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2506954
Reviewed-by: Jose Leal <joselea@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
2020-10-30 16:08:29 +00:00
Patrick Brosset 394c92ff64 Use the new color-swatch component in CSS vars
The recently introduced CSSVarSwatch component was handling color-like
variables on its own, by displaying a color swatch when needed.
This color swatch did not support shift-click format changes, nor click
to change the color.

This change removes this handling and uses the new color swatch
component instead.
This way, click and shift-click on color swatches for CSS vars does work
as expected (even if it "computed" the value and therefore removes the
var link).

GIF: https://imgur.com/egBMRU6.gif

Bug: 1137438
Change-Id: Ie7b6cf31833b6c3e0b8b225da5f4bdf512876a17
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2495208
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Shane Clifford <shanejc@microsoft.com>
2020-10-28 18:08:22 +00:00