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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>