Commit Graph
54 Commits
Author SHA1 Message Date
Jack Franklin e839c0cf22 Enable long import wrapping for JS imports
DISABLE_THIRD_PARTY_CHECK=big clang format run against all files in
front_end and test/

Bug: 1319340
Change-Id: I1fff63cb07544ccd0e3059fc901f9a48ff4af13b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598879
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2022-05-03 10:22:12 +00:00
Paul Lewis 597da1d4a1 Set theme value to default rather than systemPreferred
When refactoring the Theme Support code I mistakenly defaulted the theme
value to systemPreferred rather than default. This meant that under test
conditions some cases were failing on Mac (where we special-case the
soft context menu rendering).

This CL changes over the theme value to default, and unskips the tests.
I've verified that the change works locally, but we'll have to see what
CI makes of it.

R=jacktfranklin@chromium.org

Bug: crbug.com/1285783
Change-Id: I9078b80095b0c4713f655a89596b8c8608ebf799
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3377202
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2022-01-10 11:18:45 +00:00
Wolfgang Beyer 7ebe656164 Temporarily disable failing tests on Mac
Bug: 1285783
Change-Id: I4d8adea6b6e846b0c8e136fb80c659019163ef0a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3375549
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-01-10 10:22:45 +00:00
Jack Franklin cbe8a7dd97 [DataGrid] rewrite tests to click and drag columns like a user would
This changes makes the data grid resizing tests click and drag on the X,
Y of each column to resize, rather than querying for it in the DOM. This
also found a bug where if we have a hidden column the resizers aren't in
the right position!

Fixed: 1182676
Change-Id: I5d122aacef389303948e73ff7adc077fa612f5e5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3301396
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-26 12:00:33 +00:00
Jack Franklin def8151bf0 Enable CPU throttling on interaction tests
This CL moves the throttling code from being specific to e2e tests to
being generic in Conductor such that you can run interaction tests with
the STRESS flag and have the CPU throttled.

Doing this causes some of the interaction tests to timeout so I
increased the timeout to a more reasonable number.

Bug: none
Change-Id: Ia7fdeba6490c62b591b0feefad885df3f999cb37
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3201979
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-10-04 14:15:22 +00:00
Marijn Haverbeke 5b24e680e0 Add a CodeMirror 6-based code highlighter and TextEditor component
R=tvanderlippe@chromium.org

Bug: 1241848
Change-Id: I54cab003ebe6fe38ebce89adb4c57b259cefd9cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3197676
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-10-01 13:03:50 +00:00
Wolfgang Beyer 719b02409a Revert "Add a CodeMirror 6-based code highlighter and TextEditor component"
This reverts commit d3e904b2d6.

Reason for revert: Waterfall Sheriff: Interaction tests are failing on Mac bot
https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/5764/overview
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8834668489998970257/+/u/Interactions/stdout

Original change's description:
> Add a CodeMirror 6-based code highlighter and TextEditor component
>
> R=​tvanderlippe@chromium.org
>
> Bug: 1241848
> Change-Id: I5d28f523d8aae5f375ccee053bd935005dd7c7c0
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3194198
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

Bug: 1241848
Change-Id: I6b3380e32b228f828bd7f27e447628ab593eca14
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3197671
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-09-30 15:49:05 +00:00
Marijn Haverbeke d3e904b2d6 Add a CodeMirror 6-based code highlighter and TextEditor component
R=tvanderlippe@chromium.org

Bug: 1241848
Change-Id: I5d28f523d8aae5f375ccee053bd935005dd7c7c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3194198
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-09-30 10:57:41 +00:00
Jack Franklin e4132180df Set linux font for interaction tests to Liberation Sans
This font is shared between gLinux and the bots.

Bug: none;
Change-Id: I4a69bce005e876502130661e2844037638069b2d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3168265
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-09-17 16:20:10 +00:00
Alex Rudenko b0fea5c30b Properly inject fontFamily into the URL
Some tests already define query parameters and
not only the relative path to a test file.

Bug: none
Change-Id: Idacda49960ecf8381858e545a385acf1fcf10f45
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3168260
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
2021-09-17 12:55:00 +00:00
Alex Rudenko 5217a7ba02 Specify a single font-family for interaction tests
By default, DevTools specifies multiple font families
and which one will be selected depends on what is available
on the machine. For example, Roboto might be available on
the developer machine but not on the bots. With this change,
we reduce the number of possible font families to one ensuring
that those font families are available on both the bots and
the developer machine.

Bug: none
Change-Id: I18e1ae0924c99ee9bb98c7f258136e80add74273
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3168070
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-09-17 09:57:35 +00:00
Christy Chen 65ab8e0c03 Fixing format in data_grid_test.ts
Fixing format in this test file

Bug: none
Change-Id: I67bed035f96323a90030fe0f136d37eb801c0779
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3161605
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-09-15 06:02:12 +00:00
Jack Franklin fda44a1eb5 Add generic types to $, $$ and waitFor helpers
Puppeteer supports generics on these methods, but we didn't support them
in our helpers. This CL adds support for them, meaning we can avoid `as
HTMLElement` in some of our tests.

Bug: none
Change-Id: I2b229b81522d85e6cd9662fd867932d7e24ab7c2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3110204
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-23 11:45:28 +00:00
Jack Franklin fae999f5a7 Extract context-menu e2e helpers
I need to test the context menu in future e2e tests, so this CL pulls
the helpers I created out of the data-grid tests and into a shared
module.

Bug: none
Change-Id: Ifcb87863998301527f3e4f71ff38ea381541057d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3110372
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-23 11:30:19 +00:00
Nancy Li b3530a2181 [DevTools Protocol Monitor] UX updates
- Make table header same height as tabs on the right side.
- Hide the scrollbar in the table.

Before: https://imgur.com/a/2nYavwK
After: https://imgur.com/a/xWfBgXg

Bug: 1226764
Change-Id: Ia2a71b174a28855a4cc4b717d8517af440cc6d13
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3097669
Commit-Queue: Nancy Li <nancyly@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2021-08-18 15:05:51 +00:00
Kriti Sapra 56daf78ddb Updated no-multiple-empty-lines to only have 1 as max
DISABLE_THIRD_PARTY_CHECK=updated linting formatting
Bug: 1106746
Change-Id: I371bca95b7cf1e8b7eaa4f9e7c3860af4eedee3e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3057042
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-28 14:10:15 +00:00
Jack Franklin 947b4d23d6 [DataGrid] fix extra padding on filler row
The data-grid has a filler row that it renders to fill any additional
height of the container, but when the data-grid was filling the height
anyway this row would be 2px high (see screenshot in bug).

This CL changes the row to be 0px high, but I then found an oddness
with the rendering engine (not clear to me if it's desired behaviour
or a bug) where if the table had no rows (so we want the padding row
to be 100% high to fill the space) but then the padding row was given
`padding: 0`, it would not take up any height. Therefore we
conditionally apply an extra CSS class to give the row some padding
such that it takes up extra height in the event of the table being
empty.

Fixed: 1226745
Change-Id: I9030832320eb2554adbac1dc92dfbd8ec4cf9c2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3034608
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-07-19 09:09:20 +00:00
Alex Rudenko 97116c8374 Remove recorder experiment
Bug: none
Change-Id: I5a247853309bbcc158f0ffa7fbcc5622b098fd04
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3008034
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2021-07-06 12:47:26 +00:00
Alex Rudenko 9518059da6 [Recorder] Filter out keyboard generated click events
Fixed: chromium:1222579
Change-Id: I592004a03e0e4960458c9dd512a0c9b8ec630502
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982140
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2021-06-24 13:12:27 +00:00
Jack Franklin 5b1ab68316 [DataGrid] focusable cell logic improvements
This CL is a mix of changes within the DataGrid that improve the logic
around focusable cells. Prior to this CL the DataGrid stored one
value, which was the cell that the user would select if they tabbed
into the DataGrid. That got confusing as we used that value to also
represent the currently active cell that the user has clicked on.

This CL splits those concerns up into two properties, and improves how
we track when the user is or isn't focusing within the data-grid. It
also moves some event handlers from `click` to `focus` for the table
cells which is just a nice tidy up.

Bug: 1211346
Change-Id: If6449f5381134892705f7f42f24b226f8dbf170a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2935284
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-06-22 12:10:10 +00:00
Tim van der Lippe 46244285d4 Cleanup TypeScript configuration files and root OWNERS
This moves the required TypeScript configuration files into
/config/typescript/, which allows us to cleanup the root OWNERS.
Doing so will make it easier to make infrastructure refactorings
in our TypeScript configuration (if we for example need to add
a new file), while not requiring ENG_REVIEW_OWNERS.

DISABLE_THIRD_PARTY_CHECK=Configuration changes
R=yangguo@chromium.org,szuend@chromium.org

Bug: none
Change-Id: Icffd52d37c37b52651dc8125948dc90b2b79cdf5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2975287
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-06-22 10:45:59 +00:00
Alex Rudenko 1867f35860 [Recorder] Clean up steps
This CL removes steps and attributes that we do not currently
need and probably will never need.

Bug: chromium:1215440
Change-Id: I3ccd2200a1de0ec246e9635189082c4f1b58a2a0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2955363
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
2021-06-11 13:02:08 +00:00
Alex Rudenko 77c2fbbbaf [recorder] Ensure uniqueness of selectors
This CL changes the step format to support a list of
selectors that is needed to query elements inside Shadow DOM.
Also it adds a verification code that checks that a selector
chain resolves to a single element. Note that for CSS selectors
we don't perform the verification because we assume the generated
CSS selector is unique.

The test `test/unittests/front_end/models/recorder/recording-client_test.ts`
has been replaced with an interaction test to avoid mocking querying
functionality.

Fixed: chromium:1215440
Change-Id: Iecd5377970ac5371263db3e20f786e1ffaffbe66
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2949063
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
2021-06-11 08:09:26 +00:00
Jack Franklin 9ce08209bf [DataGrid] auto scroll improvements
This CL contains improvements to the auto scroll logic which means we
can correctly resume scrolling when the user has prevented it (e.g. by
selecting a cell) but then scrolled down to the end of the table.

It also includes a suite of interaction tests to verify the behaviour
and edge cases.

Bug: 1211346
Change-Id: Ic0905aaf2bc35dcf20d1c74dab19fb7e9eacedd5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2914884
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-25 10:32:33 +00:00
Tim van der Lippe 23283e110a Instrument code with Istanbul for interactions tests
All interaction tests are now lazily instrumented with Istanbul
to obtain code coverage. The interactions tests can be started
with `COVERAGE=1` to obtain coverage. For that, the Mocha hooks
perform the eventual reporting and gathering of data. The instrumentation
is performed in the components server itself.

To make sure that we perform the minimal amount of work required
(since code coverage instrumentation is computationally expensive),
we preload pages to populate the instrumentation cache. Every
interactions tests should preload an example (most likely basic.html)
to populate the cache. Every subsequent test will then use the
already-instrumented code, rather than computing the code over
and over again.

The eventual code coverage is written to /interactions-coverage.
The results will eventually be merged with /karma-coverage
to obtain the union of both unit and interaction tests coverage.

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

Bug: 1206705
Change-Id: I5e19b1ecef23d21107210699cb29800556e0415e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2879986
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-10 14:44:42 +00:00
Jack Franklin 68076dc55e Update theme colors component docs
This CL updates the theme colors doc so that the actual color values
come from CSS, so they don't get outdated. Additionally we now render
into a div that has the .-theme-with-dark-background class so that the
dark colors are rendered correctly too. Long term I'd like to generate
the entire list of variables automatically,but this is already an
improvement.

Bug: chromium:1152736
Change-Id: I89e44a9060fbef0866f670cced2030fdb2443526
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2853558
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-04-27 14:48:28 +00:00
Tim van der Lippe e622f55864 Move component_docs to ui/components/docs
R=jacktfranklin@chromium.org

Bug: 1187573
Change-Id: I2f8225ba1b9fc9848cf497ec0235756ace0f4831
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2826290
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-14 15:08:31 +00:00
Jack Franklin 7b65486d58 Create a base mocha config file
Whilst doing the test runner work over the last couple of weeks I
noticed that we have a variety of `mocharc.js` files that are 99% the
same, and I've had to make the same changes to most of them. This is
the first step at creating a base function that can generate the parts
of the config that are the same for each test suite.

Bug: chromium:1186163
Change-Id: I818b6831b8953084ee667f44c35a8f279fbdc55f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2784977
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-25 12:42:58 +00:00
Jack Franklin 659f7a0484 [TestRunner] load test-file-pattern setting from test runner.
Bug: chromium:1186163
Change-Id: I29423d4dde9546a7189de8f6d6865239f9c1b453
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2780795
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-23 11:26:54 +00:00
Jack Franklin f2836643c1 [TestRunner]: update Conductor to read test-server-type from config
This CL updates Conductor to look for the test runner's config
test-server-type setting before falling back to
process.env.TEST_SERVER_TYPE, which will eventually be deprecated once
the migration work is done and every testing script uses the new test
runner.

Bug: chromium:1186163
Change-Id: I9673228a36bc8285282b38c0368a6f5851ad034c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2773041
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-18 16:47:57 +00:00
Jack Franklin a3dd06a3de Add test-suite-source-dir flag to new test runner
The current tests try to figure out the root directory and then glob
for _test.ts files within there, but this breaks easily if the folder
structure isn't exactly as expected. Instead we can set this via a
flag in the test runner.

This CL only updates the interaction tests, which use the new runner.
e2e tests will be supported in time.

Bug: chromium:1186163
Change-Id: I198b67bf0081ce7334c40d7d661fb8642c2d56d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2772045
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-18 11:19:17 +00:00
Jack Franklin 29bb6314ce [TestRunner] create new test runner that takes configuration file
This CL lands the initial new run_test_suite.js that can take its
configuration from a config JSON file, or from flags.

This new script is only used to run `npm run auto-interactionstest`
and nothing more; I want to roll it out slowly and ensure that
everyone is aware of it before removing the old Python script. I will
create a doc with all the various steps, and required documentation,
as I've taken the chance to rename some options to make them clearer.

Bug: chromium:1186163
Change-Id: I5a199f82ac7ab0f323988acacaa7aae2d64e6349
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2763866
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-16 10:35:54 +00:00
Philip Pfaffe 9e8803fe5f Simplify running e2e tests selectively
Currently, a e2e tests can be run selectively using the --test-file
option of the test suite runner. This CL extends that by accepting
multiple file names or glob patterns as positional arguments.

Bug: none
Change-Id: Ie8edc254c82af1f280d1854a4cee2a3667b4629d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2727389
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-03-11 10:57:43 +00:00
Simon Zünd 372e712a01 Report e2e and interaction test results to ResultDB
Note that the actual reporting is blocked on infra changes
(more specifically our bots need to migrate to LUIC realms), before
ResultsDB is available on our bots.

Nonetheless, this change can already land. As per official guidance
no runtime flags etc should be used, but only whether the LUCI_CONTEXT
environment variable is available.

R=tvanderlippe@chromium.org

Bug: chromium:1186570
Change-Id: I2974f8b3b68f4c42c8d4ae9309ebf7ca8f58ccb4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2748084
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-11 08:46:04 +00:00
Jack Franklin 343c141919 merge inspectorStyle.css and inspectorCommon.css
It seems there is no requirement for these files to be split; they don't
seem to have a logical split and they are both injected into the `body`
element when DevTools runs. If we kept both of these files around, we'd
have to inject them both into the component docs helpers, and deal with
both of them when it comes to figuring out where legacy CSS variables
are defined.

To make it a bit simpler I've merged `inspectorStyle` into
`inspectorCommon`. I went this way because:

* `inspectorCommon.css` is (I think!) a better name than `inspectorStyle.css`
* `inspectorCommon.css` was bigger.

I also drive-by disabled the stylelint `comment-empty-line-before`,
which was forbidding empty lines before any CSS comments; which made the
entire file feel very squashed!

Bug: none
Change-Id: Ifaa834c7bf56291561e2e5cc124c4efd85c3cc56
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716285
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-26 15:50:55 +00:00
Jack Franklin 8bab3cc794 [DataGrid] Fix resizer handler positioning.
getBoundingClientRect() is incorrect to use here as it's viewport
relative; instead we want to position them based off the width of the
column.

Fixed: chromium:1182227
Change-Id: I39eeb686a5e2006f77e05558b7b73bfff430e080
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2720366
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-26 12:51:44 +00:00
Jack Franklin b0c682302a Make TreeOutline renders scheduled
Bug: chromium:1166669
Change-Id: Ieb7cbebf013c90577545f686f57f4dca04e19621
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2681736
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-02-08 15:21:25 +00:00
Jack Franklin 9247e2d2b8 Fix DataGrid interaction test with bad assertions
The CL that enabled this change landed just after another which updated
the resizing logic for the data-grid. That meant that once they both
landed, this test's assertions became out of date and it started
failing.

Bug: none
Change-Id: I6b77df3f0b2e14b2b2645a0ba2ec30d3a340b37e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2667196
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2021-02-02 11:14:18 +00:00
Jack Franklin 3e9f040e75 Allow decimal places when resizing data grid columns
Bug: none
Change-Id: I1521945756c111b61810a291c007e274c95ebcbf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2662825
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-02-02 09:31:48 +00:00
Jack Franklin e38eae5801 Re-enable data-grid resizing test
This was flaking on the waterfall; locally I have struggled to reproduce
but have added an extra check to the test which seems to help make it
more stable.

I tested it by running `it.repeat(50, ...)` in STRESS=1 and it didn't
fail once, so hopefully it will behave itself on the bots...

Bug: chromium:1172902
Change-Id: I25ad1572d63ff3e438df41bad1b0c62f38578d16
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2667189
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-02-02 09:09:28 +00:00
Kim-Anh Tran 786d84f106 [interaction-test] Disable flaky data grid test
Bug: chromium:1172902
Change-Id: I71c30c69f7b997a66972ecd36fa637e8466ebd84
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2662816
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
2021-02-01 09:00:34 +00:00
Jack Franklin e6dcd249e6 Inject inspectorStyle.css into the component docs
The interaction tests that have new values needed the change as the
inspectorStyle CSS changed the margins on the `body` element so some of the
tests had slightly different pixel values required when testing resizing.

Bug: chromium:1167724
Change-Id: I6569210264471f96040512e7f55158dec5c28bfd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2635666
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-18 16:48:16 +00:00
Jack Franklin 4e3706155a Fix flakey data-grid-controller interaction tests on Mac
Fixed: chromium:1164826
Change-Id: I75da6ced70391ab9f87628920908d8b30f1a8a11
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2619603
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-01-11 09:48:16 +00:00
Simon Zünd 9c46f2cb69 Skip flaky DataGridController interaction tests
The tests seem to only flake/fail on MacOS bot.

Bug: chromium:1164826
Change-Id: Ib6cec75b4bfcbdcaad89d7da94a975700f7dee4e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2619601
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-01-11 06:25:36 +00:00
Jack Franklin 3fcecc1172 Add body context menu to data-grid
This CL adds support for the context menu that appears when you right
click on the body row of the data-grid.

This menu shows columns you can sort by and you can toggle column
visibility via "Header Options" (the text is identical to the legacy
data grid). It also provides a hook for the user to customise and add
their own items to the context menu.

Bug: 1150793
Change-Id: I6a6d8c6c67156a575477c1e6d438261b85d9b034
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2610967
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-06 16:11:55 +00:00
Jack Franklin bb7bf72580 Fix sub menu context menu interaction tests on Mac
The interaction tests that looked for submenu entry points in a context
menu would fail on Mac, because on Mac they have the ▶ symbol, whereas
on other platforms they do not.

This CL provides a helper to search for the item with and without the ▶
and ensures the tests pass on all platforms.

Change-Id: I619ff370fbc6388ec166d9fd4b7e944788dbbf6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2612991
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-06 11:59:35 +00:00
Jack Franklin 90b6613019 Reland "Add header context menu to data grid"
This reverts commit c2ad98d783.

Reason for revert: fixed flakey test

Original change's description:
> Revert "Add header context menu to data grid"
>
> This reverts commit 6bdb3622bd.
>
> Reason for revert: Interaction tests started failing on mac.
>
> https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/2514/overview
>
> Original change's description:
> > Add header context menu to data grid
> >
> > This CL adds a default header context menu to the data grid that lists visible
> > and sortable columns much like the legacy data grid.
> >
> > Bug: 1150793
> > Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
> > Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
>
> TBR=aerotwist@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: Ic8ef16044716d922d3a37b6a8fb32e13a75dee72
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1150793
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601962
> Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
> Commit-Queue: Jan Scheffler <janscheffler@chromium.org>

TBR=aerotwist@chromium.org,szuend@chromium.org,janscheffler@chromium.org,jacktfranklin@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1150793
Change-Id: Ibd352be261d2cefee6fccc4b18b438faaad57631
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2610596
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-01-05 11:56:39 +00:00
Jan Scheffler c2ad98d783 Revert "Add header context menu to data grid"
This reverts commit 6bdb3622bd.

Reason for revert: Interaction tests started failing on mac.

https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/2514/overview

Original change's description:
> Add header context menu to data grid
>
> This CL adds a default header context menu to the data grid that lists visible
> and sortable columns much like the legacy data grid.
>
> Bug: 1150793
> Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

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

Change-Id: Ic8ef16044716d922d3a37b6a8fb32e13a75dee72
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1150793
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601962
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-12-23 07:27:30 +00:00
Jack Franklin 6bdb3622bd Add header context menu to data grid
This CL adds a default header context menu to the data grid that lists visible
and sortable columns much like the legacy data grid.

Bug: 1150793
Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-22 15:43:47 +00:00
Jack Franklin 15ab1a3fc7 [DataGrid]: test to ensure resize persists as data is added
I was wondering if this would work or not. Turns out it does (yay!) but
feels like the sort of thing that would be easy to break, so adding a
test for resizing, and then adding data, to ensure that adding data
doesn't reset the user's resize.

Change-Id: I0efb7def31119148e12e2c3decc726aaa8923425
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2593140
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-16 13:21:44 +00:00