chrome-devtools-frontend 1.0.1515796 → 1.0.1515988
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/contributing/infrastructure.md +131 -82
- package/front_end/Tests.js +3 -29
- package/front_end/core/common/Progress.ts +73 -55
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/protocol_client/InspectorBackend.ts +2 -0
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +12 -10
- package/front_end/core/sdk/CSSModel.ts +1 -31
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +27 -7
- package/front_end/core/sdk/DebuggerModel.ts +1 -31
- package/front_end/core/sdk/EnhancedTracesParser.ts +81 -50
- package/front_end/core/sdk/NetworkManager.ts +1 -31
- package/front_end/core/sdk/NetworkRequest.ts +1 -31
- package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1003 -0
- package/front_end/core/sdk/RehydratingConnection.ts +13 -18
- package/front_end/core/sdk/RehydratingObject.ts +8 -31
- package/front_end/core/sdk/RemoteObject.ts +1 -31
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -31
- package/front_end/core/sdk/RuntimeModel.ts +1 -31
- package/front_end/core/sdk/ServiceWorkerManager.ts +1 -31
- package/front_end/core/sdk/SourceMap.ts +1 -31
- package/front_end/core/sdk/TraceObject.ts +8 -3
- package/front_end/entrypoints/main/MainImpl.ts +0 -2
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -3
- package/front_end/models/ai_assistance/ConversationHandler.ts +4 -6
- package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +107 -72
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +178 -85
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +308 -218
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +100 -100
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +10 -1
- package/front_end/models/ai_assistance/performance/AIContext.ts +19 -21
- package/front_end/models/bindings/ContentProviderBasedProject.ts +6 -4
- package/front_end/models/breakpoints/BreakpointManager.ts +3 -3
- package/front_end/models/har/Writer.ts +11 -11
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +3 -3
- package/front_end/models/persistence/IsolatedFileSystem.ts +4 -4
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -7
- package/front_end/models/persistence/PersistenceImpl.ts +8 -8
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/trace/ModelImpl.ts +2 -16
- package/front_end/models/trace/Processor.ts +15 -9
- package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +4 -4
- package/front_end/models/trace/handlers/FramesHandler.ts +2 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -10
- package/front_end/models/trace/handlers/MetaHandler.ts +11 -9
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +1 -1
- package/front_end/models/trace/handlers/ScriptsHandler.ts +5 -5
- package/front_end/models/trace/handlers/UserInteractionsHandler.ts +2 -14
- package/front_end/models/trace/handlers/UserTimingsHandler.ts +3 -4
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +3 -4
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/ImageDelivery.ts +1 -1
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/types.ts +2 -0
- package/front_end/models/trace/types/TraceEvents.ts +41 -64
- package/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +21 -99
- package/front_end/panels/application/ServiceWorkersView.ts +0 -1
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
- package/front_end/panels/common/GdpSignUpDialog.ts +6 -3
- package/front_end/panels/console/ConsoleView.ts +23 -28
- package/front_end/panels/console/ConsoleViewport.ts +2 -2
- package/front_end/panels/console/consoleView.css +11 -1
- package/front_end/panels/coverage/CoverageView.ts +2 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +8 -19
- package/front_end/panels/elements/StylePropertyTreeElement.ts +39 -25
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -3
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/layers/LayerTreeModel.ts +3 -3
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -4
- package/front_end/panels/network/NetworkLogView.ts +1 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/NetworkSearchScope.ts +6 -6
- package/front_end/panels/search/SearchView.ts +33 -32
- package/front_end/panels/settings/components/SyncSection.ts +6 -1
- package/front_end/panels/sources/SourcesSearchScope.ts +4 -4
- package/front_end/panels/sources/TabbedEditorContainer.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -5
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -15
- package/front_end/panels/timeline/TimelinePanel.ts +41 -22
- package/front_end/panels/timeline/TracingLayerTree.ts +4 -5
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +37 -22
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +17 -7
- package/front_end/third_party/axe-core/README.chromium +1 -0
- package/front_end/third_party/codemirror/README.chromium +1 -0
- package/front_end/third_party/codemirror.next/README.chromium +1 -0
- package/front_end/third_party/csp_evaluator/README.chromium +1 -0
- package/front_end/third_party/diff/README.chromium +1 -0
- package/front_end/third_party/i18n/README.chromium +1 -0
- package/front_end/third_party/intl-messageformat/README.chromium +1 -0
- package/front_end/third_party/json5/README.chromium +1 -0
- package/front_end/third_party/legacy-javascript/README.chromium +1 -0
- package/front_end/third_party/lighthouse/README.chromium +1 -0
- package/front_end/third_party/lit/README.chromium +1 -0
- package/front_end/third_party/marked/README.chromium +1 -0
- package/front_end/third_party/puppeteer-replay/README.chromium +1 -0
- package/front_end/third_party/third-party-web/README.chromium +1 -0
- package/front_end/third_party/vscode.web-custom-data/README.chromium +1 -0
- package/front_end/third_party/wasmparser/README.chromium +1 -0
- package/front_end/third_party/web-vitals/README.chromium +1 -0
- package/front_end/ui/components/tooltips/Tooltip.ts +17 -1
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +7 -3
- package/front_end/ui/legacy/ProgressIndicator.ts +29 -16
- package/front_end/ui/legacy/TabbedPane.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +10 -5
- package/front_end/ui/legacy/UIUtils.ts +42 -10
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +14 -14
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -29
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +14 -14
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/inspector_overlay/highlight_common.ts +1 -27
- package/inspector_overlay/highlight_grid_common.ts +1 -27
- package/inspector_overlay/tool_highlight.ts +1 -27
- package/inspector_overlay/tool_persistent.ts +1 -27
- package/inspector_overlay/tool_source_order.ts +1 -27
- package/package.json +1 -1
@@ -45,7 +45,7 @@ git new-branch branch-name --upstream_current
|
|
45
45
|
- `buckets/ci.star`: configurations to run on the main branch after a CL
|
46
46
|
is submitted also known as CI or Waterfall builders.
|
47
47
|
- `buckets/ci-hp.star`: configurations for the highly privileged
|
48
|
-
builders that rolls dependencies.
|
48
|
+
builders that rolls dependencies.
|
49
49
|
|
50
50
|
After you update a `.star` file, re-generate generated files using
|
51
51
|
`lucicfg main.star`.
|
@@ -89,10 +89,10 @@ which builders are needed to verify a CQ. See `custom_locationsfilters`
|
|
89
89
|
for the current logic.
|
90
90
|
|
91
91
|
Some of the filters currently in use are:
|
92
|
-
- `cpp_debug_extension` builders only trigger on changes related to the extension
|
93
|
-
- `dtf_check_no_bundle` builder only trigger on GN changes
|
94
|
-
- all other builders will not trigger if only documentation files are updated
|
95
92
|
|
93
|
+
- `cpp_debug_extension` builders only trigger on changes related to the extension
|
94
|
+
- `dtf_check_no_bundle` builder only trigger on GN changes
|
95
|
+
- all other builders will not trigger if only documentation files are updated
|
96
96
|
|
97
97
|
## Branch cutting process
|
98
98
|
|
@@ -100,17 +100,18 @@ At the end of every release cycle Chromium will cut a new branch for the current
|
|
100
100
|
|
101
101
|
The branch cut process for DevTools is as simple as updating the beta, stable
|
102
102
|
and extended branch numbers in infra/config (example [CL](https://crrev.com/c/6850649)):
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
-
|
111
|
-
|
112
|
-
-
|
113
|
-
|
103
|
+
|
104
|
+
- checkout infra/config branch
|
105
|
+
- pull and create a new branch ([see](#Submitting an infra config change))
|
106
|
+
- update the definitions.star file:
|
107
|
+
- extended number gets updated every second release:
|
108
|
+
- if the extended number is equal to the stable number, then update
|
109
|
+
extended to the current beta number
|
110
|
+
- otherwise update it to the current stable number
|
111
|
+
- stable number updates to the current beta number
|
112
|
+
- beta number updates to the Chromium beta brunch number ([see](https://chromiumdash.appspot.com/branches))
|
113
|
+
- regenerate the cfg files (`lucicfg main.star`), commit, upload and add
|
114
|
+
liviurau@chromium.org as reviewer (or another infra team member)
|
114
115
|
|
115
116
|
Changing these numbers will reconfigure the CI and CQ for [beta](https://ci.chromium.org/p/devtools-frontend/g/beta/console),
|
116
117
|
[stable](https://ci.chromium.org/p/devtools-frontend/g/stable/console) and
|
@@ -119,7 +120,7 @@ After landing the change the three branch consoles will get reset.
|
|
119
120
|
|
120
121
|
## Toggle tree closing behaviour on CI builders
|
121
122
|
|
122
|
-
Sometimes we might need to avoid a
|
123
|
+
Sometimes we might need to avoid a misbehaving builder closing the tree. Or maybe
|
123
124
|
we need to make a FYI builder a tree closer.
|
124
125
|
|
125
126
|
To do so find your builder buckets/ci.star file and toggle the
|
@@ -130,31 +131,34 @@ Make sure you regenerated the cfg files and upload your changes. [Example](https
|
|
130
131
|
## Toggle blocking behaviour of CQ builders
|
131
132
|
|
132
133
|
CQ builders come in 3 flavors:
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
134
|
+
|
135
|
+
- regular try builder: will always prevent a CL from landing when the builder
|
136
|
+
fails
|
137
|
+
- includable builder: will run only if explicitly added to a CQ run and will
|
138
|
+
prevent a CL from landing if the builder fails
|
139
|
+
- experimental builder: will run a percentage of the times it gets an
|
140
|
+
opportunity run and will not block the CL from landing if the builder fails
|
139
141
|
|
140
142
|
To toggle this behaviour you need to edit `buckets/try.star` file ([example](https://crrev.com/c/6903181)):
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
143
|
+
|
144
|
+
- all builders must be enumerated in `cq_builders.devtools_builders` list
|
145
|
+
- to make a builder includable add it's name `cq_builders.includable_only_builders`
|
146
|
+
list; remove it from the list to make it a regular builder
|
147
|
+
- to make a builder experimental add it's name `cq_builders.experiment_builders`
|
148
|
+
dictionary together with the desired experiment rate percentage; remove it
|
149
|
+
from the list to make it a regular builder
|
147
150
|
|
148
151
|
## Adding a new builder in CQ
|
149
152
|
|
150
|
-
To add a new try-builder edit the
|
153
|
+
To add a new try-builder edit the [try.start](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/infra/config/buckets/try.star) file to call one of the
|
151
154
|
existing functions that generate builder definitions:
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
-
|
157
|
-
|
155
|
+
|
156
|
+
- `try_builder` used for builder with recipes that do not orchestrate other
|
157
|
+
builders:
|
158
|
+
- build only builders (`dtf_check_no_bundle`)
|
159
|
+
- chromium builders (`devtools_frontend_linux_blink_light_rel_fastbuild`)
|
160
|
+
- `try_pair` used for builders with orchestrating recipes (delegates to a
|
161
|
+
compilator builder before delegating testing to swarming)
|
158
162
|
|
159
163
|
Alternatively define your own builder function and call it for the instances you
|
160
164
|
need (see `presubmit_builder` and `cpp_debug_extension_try`).
|
@@ -168,7 +172,7 @@ builder to `cq_builders.chromium_builders` list.
|
|
168
172
|
|
169
173
|
## Adding a new builder in CI
|
170
174
|
|
171
|
-
To add a new try-builder edit the
|
175
|
+
To add a new try-builder edit the [ci.start](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/infra/config/buckets/ci.star) file to add a new
|
172
176
|
`builder_descriptor` to the `builders` of `generate_ci_configs` function call.
|
173
177
|
|
174
178
|
In your descriptor decide for the name of builder, the recipe, any other custom
|
@@ -182,54 +186,55 @@ run the devtools/trybot_tester recipe and are responsible with building DevTools
|
|
182
186
|
Frontend and running our tests.
|
183
187
|
|
184
188
|
Below is a detailed description of what happens in such a build:
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
-
|
198
|
-
|
199
|
-
|
200
|
-
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
189
|
+
|
190
|
+
- The recipe will perform the `bot_update` and `gclient runhooks` step where
|
191
|
+
the tip-of-tree for devtools-frontend gets checked out, your changes get
|
192
|
+
patched on top of it and dependencies get updated.
|
193
|
+
- The compilator bot get triggered (`initialization` step)
|
194
|
+
- We wait for the compilator bot to finish. This bot is responsible for
|
195
|
+
the actual build of devtools-frontend.
|
196
|
+
- It does a `bot_update` of its own
|
197
|
+
- Generates the GN files (`gn` step)
|
198
|
+
- Compiles (`compile`) the project
|
199
|
+
- Reads the e2e_non_hosted test lists
|
200
|
+
- Creates a CAS archive with project and the compilation output
|
201
|
+
- Outputs the `compilator_properties`
|
202
|
+
- Once the compilator is done we read the `compilator_properties` to find
|
203
|
+
- the `cas_digest` to be used when triggering tests on swarming
|
204
|
+
- the `e2e_non_hosted_test_list` for sharding the e2e tests execution
|
205
|
+
- Write the e2e test list at the location where building would have written it
|
206
|
+
- The default test run phase starts at `Run tests` step:
|
207
|
+
- We trigger all tests on swarming in parallel (`Trigger Tests`) substep.
|
208
|
+
- For all types of tests we calculate the command we want to run on swarming
|
209
|
+
and trigger a task with that command and the collected CAS digest
|
210
|
+
- Before calculating the command for e2e test we read the test list and
|
211
|
+
and split it in a number of shards. Each shard will have the allocated
|
212
|
+
tests specified in the command.
|
213
|
+
- We wait for all swarming task to complete
|
214
|
+
- Next we re-run the failed tests in attempt to exonerate their initial
|
215
|
+
failures (`Flake exoneration attempt` step):
|
216
|
+
- We query ResultDB for any tests that might have failed
|
217
|
+
- We collect the failed test names and construct new commands to re-run
|
218
|
+
them on new swarming tasks
|
219
|
+
- We wait for all swarming task to complete
|
220
|
+
- Finally we will stress test the tests that were added/modified by the
|
221
|
+
current CL in the `Detect flakes in new tests` step
|
222
|
+
- Run `git diff` to determine which tests were added/modified
|
223
|
+
- Construct the command to be run on swarming
|
224
|
+
- Trigger and wait for the swarming tasks to finish
|
225
|
+
- Calculate the outcome of the builder:
|
226
|
+
- fail the builder if tests failed in the default run and the exoneration
|
227
|
+
run was unsuccessful
|
228
|
+
- fail the builder if tests failed in the deflaking phase
|
229
|
+
- otherwise report build as passing
|
225
230
|
|
226
231
|
### Common build failures
|
227
232
|
|
228
|
-
The first place where a build
|
233
|
+
The first place where a build usually fails is on `bot_update` and this usually
|
229
234
|
happens because your changes cannot be applied on top of the current tip-of-tree.
|
230
235
|
Rebase your CL and solve any merge conflicts and this failure will go away.
|
231
236
|
|
232
|
-
Another common failure is a compilation failure. You can
|
237
|
+
Another common failure is a compilation failure. You can inspect the compilator
|
233
238
|
builder (`dtf_*_compiler_rel`) separately by following the link next to the
|
234
239
|
`compilator steps` step.
|
235
240
|
|
@@ -237,9 +242,53 @@ If you have too many tests failing in the default phase the exoneration phase
|
|
237
242
|
gets skipped.
|
238
243
|
|
239
244
|
A test might not get exonerated in your build even if your CL does not touch
|
240
|
-
anything related to it. The exoneration phase will re-run previously
|
245
|
+
anything related to it. The exoneration phase will re-run previously failing
|
241
246
|
tests a number of times and at any point the test passes the tests gets
|
242
247
|
exonerated. Therefore a test can have a recent history of getting exonerated
|
243
|
-
even if it
|
244
|
-
correlate your failure with a luci-
|
245
|
-
|
248
|
+
even if it consistently failed 4 times out of 5 runs for some time. Try to
|
249
|
+
correlate your failure with a luci-analysis report on this test and skip it
|
250
|
+
until the flakiness gets resolved.
|
251
|
+
|
252
|
+
## Luci Analysis configuration
|
253
|
+
|
254
|
+
[Luci Analysis](go/luci-analysis) is a tool that helps you understand the
|
255
|
+
impact of test failures.
|
256
|
+
|
257
|
+
You can find the DevTools configuration in [luci-analysis.cfg](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/infra/config/luci-analysis.cfg).
|
258
|
+
|
259
|
+
We configure the rules for test failure clustering based on _file_/_suite_ and
|
260
|
+
_testcase_ names.
|
261
|
+
|
262
|
+
A policy named `too-many-failures` is defined in the configuration with
|
263
|
+
activation/deactivation thresholds and a bug template to be used when creating
|
264
|
+
a new bug. The bugs will be automatically created in Buganizer on the configured
|
265
|
+
default component (or on the component specified in a `DIR_METADATA` file on the
|
266
|
+
ancestor path of the failing test file).
|
267
|
+
|
268
|
+
After updating the `luci-analysis.cfg` file make sure you run `lucicfg main.star` to
|
269
|
+
refresh the copy of this file in the `generated/` folder.
|
270
|
+
|
271
|
+
## Autorollers
|
272
|
+
|
273
|
+
### Rolling DevTools to Chromium
|
274
|
+
|
275
|
+
A [Skia autoroller](https://skia.googlesource.com/buildbot/+/main/autoroll/README.md)
|
276
|
+
is responsible for rolling DevTools to Chromium. Follow the links to inspect the
|
277
|
+
[status](https://autoroll.skia.org/r/devtools-frontend-chromium?tab=status) of
|
278
|
+
the roller.
|
279
|
+
|
280
|
+
To update the configuration you will need to clone the skia [repo](sso://skia/skia-autoroll-internal-config)
|
281
|
+
and modify the `skia-infra-public/devtools-frontend-chromium.cfg` file ([example](https://review.skia.org/1014616)).
|
282
|
+
|
283
|
+
### Rolling dependencies to DevTools
|
284
|
+
|
285
|
+
To roll all DevTool's dependencies we rely on the [Roll deps and chromium pin
|
286
|
+
into devtools-frontend](https://ci.chromium.org/ui/p/devtools-frontend/builders/ci-hp/Roll%20deps%20and%20chromium%20pin%20into%20devtools-frontend)
|
287
|
+
builder that runs on the [infra](https://ci.chromium.org/ui/p/devtools-frontend/g/infra/builders)
|
288
|
+
console.
|
289
|
+
|
290
|
+
The builder is scheduled to run every day at 05 and 14 hours. In the [recipe](https://source.chromium.org/chromium/infra/infra_superproject/+/main:build/recipes/recipes/devtools/auto_roll_incoming.py?q=file:recipes%2Fdevtools%2Fauto_roll_incoming.py)
|
291
|
+
that runs on this builder you can configure dependencies that you need excluded
|
292
|
+
from the rolls and reviewer emails. The recipe uses the V8's autorolling rolling
|
293
|
+
[module](https://source.chromium.org/chromium/infra/infra_superproject/+/main:build/recipes/recipe_modules/v8_auto_roller/api.py),
|
294
|
+
that offers support for trusted and untrusted dependencies ([regular](https://source.chromium.org/chromium/infra/infra_superproject/+/main:build/recipes/recipe_modules/v8_auto_roller/deps_handlers.py)), [CfT](https://source.chromium.org/chromium/infra/infra_superproject/+/main:build/recipes/recipe_modules/v8_auto_roller/chrome_handler.py) pin rolling, and [script based](https://source.chromium.org/chromium/infra/infra_superproject/+/main:build/recipes/recipe_modules/v8_auto_roller/script_handlers.py) special rolls.
|
package/front_end/Tests.js
CHANGED
@@ -1,32 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
* Redistribution and use in source and binary forms, with or without
|
5
|
-
* modification, are permitted provided that the following conditions are
|
6
|
-
* met:
|
7
|
-
*
|
8
|
-
* * Redistributions of source code must retain the above copyright
|
9
|
-
* notice, this list of conditions and the following disclaimer.
|
10
|
-
* * Redistributions in binary form must reproduce the above
|
11
|
-
* copyright notice, this list of conditions and the following disclaimer
|
12
|
-
* in the documentation and/or other materials provided with the
|
13
|
-
* distribution.
|
14
|
-
* * Neither the name of Google Inc. nor the names of its
|
15
|
-
* contributors may be used to endorse or promote products derived from
|
16
|
-
* this software without specific prior written permission.
|
17
|
-
*
|
18
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19
|
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
20
|
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
21
|
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
22
|
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24
|
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
26
|
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
-
*/
|
1
|
+
// Copyright 2010 The Chromium Authors
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
30
4
|
|
31
5
|
/**
|
32
6
|
* @file This file contains small testing framework along with the
|
@@ -2,20 +2,20 @@
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
|
-
export
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
5
|
+
export interface Progress {
|
6
|
+
totalWork: number;
|
7
|
+
worked: number;
|
8
|
+
title: string|undefined;
|
9
|
+
canceled: boolean;
|
10
|
+
done: boolean;
|
11
|
+
}
|
12
|
+
|
13
|
+
export class Progress implements Progress {
|
14
|
+
totalWork = 0;
|
15
|
+
worked = 0;
|
16
|
+
title: string|undefined = undefined;
|
17
|
+
canceled = false;
|
18
|
+
done = false;
|
19
19
|
}
|
20
20
|
|
21
21
|
export class CompositeProgress {
|
@@ -27,15 +27,15 @@ export class CompositeProgress {
|
|
27
27
|
this.parent = parent;
|
28
28
|
this.#children = [];
|
29
29
|
this.#childrenDone = 0;
|
30
|
-
this.parent.
|
31
|
-
this.parent.
|
30
|
+
this.parent.totalWork = 1;
|
31
|
+
this.parent.worked = 0;
|
32
32
|
}
|
33
33
|
|
34
34
|
childDone(): void {
|
35
35
|
if (++this.#childrenDone !== this.#children.length) {
|
36
36
|
return;
|
37
37
|
}
|
38
|
-
this.parent.done
|
38
|
+
this.parent.done = true;
|
39
39
|
}
|
40
40
|
|
41
41
|
createSubProgress(weight?: number): SubProgress {
|
@@ -50,12 +50,12 @@ export class CompositeProgress {
|
|
50
50
|
|
51
51
|
for (let i = 0; i < this.#children.length; ++i) {
|
52
52
|
const child = this.#children[i];
|
53
|
-
if (child.
|
54
|
-
done += child.
|
53
|
+
if (child.totalWork) {
|
54
|
+
done += child.weight * child.worked / child.totalWork;
|
55
55
|
}
|
56
|
-
totalWeights += child.
|
56
|
+
totalWeights += child.weight;
|
57
57
|
}
|
58
|
-
this.parent.
|
58
|
+
this.parent.worked = done / totalWeights;
|
59
59
|
}
|
60
60
|
}
|
61
61
|
|
@@ -72,45 +72,41 @@ export class SubProgress implements Progress {
|
|
72
72
|
this.#totalWork = 0;
|
73
73
|
}
|
74
74
|
|
75
|
-
|
76
|
-
return this.#composite.parent.
|
75
|
+
get canceled(): boolean {
|
76
|
+
return this.#composite.parent.canceled;
|
77
77
|
}
|
78
78
|
|
79
|
-
|
80
|
-
this.#composite.parent.
|
79
|
+
set title(title: string) {
|
80
|
+
this.#composite.parent.title = title;
|
81
81
|
}
|
82
82
|
|
83
|
-
done(
|
84
|
-
|
83
|
+
set done(done: boolean) {
|
84
|
+
if (!done) {
|
85
|
+
return;
|
86
|
+
}
|
87
|
+
this.worked = this.#totalWork;
|
85
88
|
this.#composite.childDone();
|
86
89
|
}
|
87
90
|
|
88
|
-
|
91
|
+
set totalWork(totalWork: number) {
|
89
92
|
this.#totalWork = totalWork;
|
90
93
|
this.#composite.update();
|
91
94
|
}
|
92
95
|
|
93
|
-
|
96
|
+
set worked(worked: number) {
|
94
97
|
this.#worked = worked;
|
95
|
-
if (typeof title !== 'undefined') {
|
96
|
-
this.setTitle(title);
|
97
|
-
}
|
98
98
|
this.#composite.update();
|
99
99
|
}
|
100
100
|
|
101
|
-
|
102
|
-
this.setWorked(this.#worked + (worked || 1));
|
103
|
-
}
|
104
|
-
|
105
|
-
getWeight(): number {
|
101
|
+
get weight(): number {
|
106
102
|
return this.#weight;
|
107
103
|
}
|
108
104
|
|
109
|
-
|
105
|
+
get worked(): number {
|
110
106
|
return this.#worked;
|
111
107
|
}
|
112
108
|
|
113
|
-
|
109
|
+
get totalWork(): number {
|
114
110
|
return this.#totalWork;
|
115
111
|
}
|
116
112
|
}
|
@@ -118,45 +114,67 @@ export class SubProgress implements Progress {
|
|
118
114
|
export class ProgressProxy implements Progress {
|
119
115
|
readonly #delegate: Progress|null|undefined;
|
120
116
|
readonly #doneCallback: (() => void)|undefined;
|
121
|
-
|
117
|
+
readonly #updateCallback: (() => void)|undefined;
|
118
|
+
|
119
|
+
constructor(delegate?: Progress|null, doneCallback?: (() => void), updateCallback?: (() => void)) {
|
122
120
|
this.#delegate = delegate;
|
123
121
|
this.#doneCallback = doneCallback;
|
122
|
+
this.#updateCallback = updateCallback;
|
124
123
|
}
|
125
124
|
|
126
|
-
|
127
|
-
return this.#delegate ? this.#delegate.
|
125
|
+
get canceled(): boolean {
|
126
|
+
return this.#delegate ? this.#delegate.canceled : false;
|
128
127
|
}
|
129
128
|
|
130
|
-
|
129
|
+
set title(title: string) {
|
131
130
|
if (this.#delegate) {
|
132
|
-
this.#delegate.
|
131
|
+
this.#delegate.title = title;
|
132
|
+
}
|
133
|
+
if (this.#updateCallback) {
|
134
|
+
this.#updateCallback();
|
133
135
|
}
|
134
136
|
}
|
135
137
|
|
136
|
-
|
138
|
+
get title(): string {
|
139
|
+
return this.#delegate?.title ?? '';
|
140
|
+
}
|
141
|
+
|
142
|
+
set done(done: boolean) {
|
137
143
|
if (this.#delegate) {
|
138
|
-
this.#delegate.done
|
144
|
+
this.#delegate.done = done;
|
139
145
|
}
|
140
|
-
if (this.#doneCallback) {
|
146
|
+
if (done && this.#doneCallback) {
|
141
147
|
this.#doneCallback();
|
142
148
|
}
|
143
149
|
}
|
144
150
|
|
145
|
-
|
146
|
-
|
147
|
-
this.#delegate.setTotalWork(totalWork);
|
148
|
-
}
|
151
|
+
get done(): boolean {
|
152
|
+
return this.#delegate ? this.#delegate.done : false;
|
149
153
|
}
|
150
154
|
|
151
|
-
|
155
|
+
set totalWork(totalWork: number) {
|
152
156
|
if (this.#delegate) {
|
153
|
-
this.#delegate.
|
157
|
+
this.#delegate.totalWork = totalWork;
|
154
158
|
}
|
159
|
+
if (this.#updateCallback) {
|
160
|
+
this.#updateCallback();
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
get totalWork(): number {
|
165
|
+
return this.#delegate ? this.#delegate.totalWork : 0;
|
155
166
|
}
|
156
167
|
|
157
|
-
|
168
|
+
set worked(worked: number) {
|
158
169
|
if (this.#delegate) {
|
159
|
-
this.#delegate.
|
170
|
+
this.#delegate.worked = worked;
|
160
171
|
}
|
172
|
+
if (this.#updateCallback) {
|
173
|
+
this.#updateCallback?.();
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
get worked(): number {
|
178
|
+
return this.#delegate ? this.#delegate.worked : 0;
|
161
179
|
}
|
162
180
|
}
|
@@ -793,7 +793,6 @@ export enum DevtoolsExperiments {
|
|
793
793
|
'just-my-code' = 65,
|
794
794
|
'use-source-map-scopes' = 76,
|
795
795
|
'timeline-show-postmessage-events' = 86,
|
796
|
-
'timeline-save-as-gz' = 108,
|
797
796
|
'timeline-enhanced-traces' = 90,
|
798
797
|
'timeline-compiled-sources' = 91,
|
799
798
|
'timeline-debug-mode' = 93,
|
@@ -155,12 +155,14 @@ let connectionFactory: () => Connection;
|
|
155
155
|
export class Connection {
|
156
156
|
declare onMessage: ((arg0: Object) => void)|null;
|
157
157
|
|
158
|
+
// on message from browser
|
158
159
|
setOnMessage(_onMessage: (arg0: Object|string) => void): void {
|
159
160
|
}
|
160
161
|
|
161
162
|
setOnDisconnect(_onDisconnect: (arg0: string) => void): void {
|
162
163
|
}
|
163
164
|
|
165
|
+
// send raw CDP message to browser
|
164
166
|
sendRawMessage(_message: string): void {
|
165
167
|
}
|
166
168
|
|
@@ -326,7 +326,6 @@ export const enum ExperimentName {
|
|
326
326
|
TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
|
327
327
|
TIMELINE_ENHANCED_TRACES = 'timeline-enhanced-traces',
|
328
328
|
TIMELINE_COMPILED_SOURCES = 'timeline-compiled-sources',
|
329
|
-
TIMELINE_SAVE_AS_GZ = 'timeline-save-as-gz',
|
330
329
|
// Adding or removing an entry from this enum?
|
331
330
|
// You will need to update:
|
332
331
|
// 1. REGISTERED_EXPERIMENTS in EnvironmentHelpers.ts (to create this experiment in the test env)
|