Skip to content

Commit 3f97884

Browse files
committed
WIP: test
1 parent 3be9462 commit 3f97884

File tree

60 files changed

+300
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+300
-260
lines changed

config/gni/devtools_grd_files.gni

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,9 @@ grd_files_release_sources = [
667667
"front_end/panels/profiler/profiler.js",
668668
"front_end/panels/protocol_monitor/protocol_monitor-meta.js",
669669
"front_end/panels/protocol_monitor/protocol_monitor.js",
670+
"front_end/panels/react_devtools/react_devtools.js",
670671
"front_end/panels/react_devtools/react_devtools_components-meta.js",
671672
"front_end/panels/react_devtools/react_devtools_profiler-meta.js",
672-
"front_end/panels/react_devtools/react_devtools.js",
673673
"front_end/panels/recorder/components/components.js",
674674
"front_end/panels/recorder/controllers/controllers.js",
675675
"front_end/panels/recorder/converters/converters.js",
@@ -716,12 +716,12 @@ grd_files_release_sources = [
716716
"front_end/panels/web_audio/web_audio.js",
717717
"front_end/panels/webauthn/webauthn-meta.js",
718718
"front_end/panels/webauthn/webauthn.js",
719-
"front_end/rn_fusebox.html",
720-
"front_end/rn_inspector.html",
721719
"front_end/panels/whats_new/resources/WNDT.md",
722720
"front_end/panels/whats_new/whats_new-meta.js",
723721
"front_end/panels/whats_new/whats_new.js",
724722
"front_end/rehydrated_devtools_app.html",
723+
"front_end/rn_fusebox.html",
724+
"front_end/rn_inspector.html",
725725
"front_end/services/puppeteer/puppeteer.js",
726726
"front_end/services/trace_bounds/trace_bounds.js",
727727
"front_end/services/tracing/tracing.js",
@@ -880,8 +880,8 @@ grd_files_debug_sources = [
880880
"front_end/core/platform/UserVisibleError.js",
881881
"front_end/core/protocol_client/InspectorBackend.js",
882882
"front_end/core/protocol_client/NodeURL.js",
883-
"front_end/core/root/Runtime.js",
884883
"front_end/core/rn_experiments/experimentsImpl.js",
884+
"front_end/core/root/Runtime.js",
885885
"front_end/core/sdk/AccessibilityModel.js",
886886
"front_end/core/sdk/AnimationModel.js",
887887
"front_end/core/sdk/AutofillModel.js",

front_end/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ group("front_end") {
1313
":devtools_json",
1414
":embedder-scripts",
1515
":html_entrypoints",
16-
":integration_test_runner",
1716
":index_html",
17+
":integration_test_runner",
1818
"Images",
1919
"core/i18n/locales",
2020
"entrypoints/device_mode_emulation_frame",

front_end/core/common/ResourceType.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,9 @@ export const resourceCategories = {
393393

394394
export const resourceCategoriesReactNative = {
395395
XHR: new ResourceCategory(
396-
'Fetch and XHR', i18nLazyString(UIStrings.fetchAndXHR), i18n.i18n.lockedLazyString('Fetch/XHR')),
396+
'Fetch and XHR', i18nLazyString(UIStrings.fetchAndXHR), i18n.i18n.lockedLazyString('Fetch/XHR')),
397397
Script:
398-
new ResourceCategory(UIStrings.javascript, i18nLazyString(UIStrings.javascript), i18nLazyString(UIStrings.js)),
398+
new ResourceCategory(UIStrings.javascript, i18nLazyString(UIStrings.javascript), i18nLazyString(UIStrings.js)),
399399
Image: new ResourceCategory(UIStrings.image, i18nLazyString(UIStrings.image), i18nLazyString(UIStrings.img)),
400400
Media: new ResourceCategory(UIStrings.media, i18nLazyString(UIStrings.media), i18nLazyString(UIStrings.media)),
401401
Other: new ResourceCategory(UIStrings.other, i18nLazyString(UIStrings.other), i18nLazyString(UIStrings.other)),

front_end/core/host/RNPerfMetrics.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@ function getPerfTimestamp(): DOMHighResTimeStamp {
295295

296296
function maybeTruncateDeveloperResourceUrl(parsedURL: ParsedURL): string {
297297
const {url} = parsedURL;
298-
return parsedURL.scheme === 'http' || parsedURL.scheme === 'https' ? url : `${url.slice(0, 100)} …(omitted ${url.length - 100} characters)`;
298+
return parsedURL.scheme === 'http' || parsedURL.scheme === 'https' ?
299+
url :
300+
`${url.slice(0, 100)} …(omitted ${url.length - 100} characters)`;
299301
}
300302

301303
function maybeWrapError(baseMessage: string, error: unknown): [string, Error] {

front_end/core/rn_experiments/experimentsImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ interface RNExperimentSpec {
6565
unstable: boolean;
6666
docLink?: string;
6767
feedbackLink?: string;
68-
enabledByDefault?: boolean | RNExperimentPredicate;
68+
enabledByDefault?: boolean|RNExperimentPredicate;
6969
}
7070

7171
class RNExperiment {

front_end/core/sdk/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ devtools_module("sdk") {
6363
"PaintProfiler.ts",
6464
"PerformanceMetricsModel.ts",
6565
"PreloadingModel.ts",
66+
"ReactNativeApplicationModel.ts",
6667
"RehydratingConnection.ts",
6768
"RehydratingObject.ts",
6869
"RemoteObject.ts",
69-
"ReactNativeApplicationModel.ts",
7070
"Resource.ts",
7171
"ResourceTreeModel.ts",
7272
"RuntimeModel.ts",

front_end/core/sdk/Connections.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export class WebSocketConnection implements ProtocolClient.InspectorBackend.Conn
9595
constructor(
9696
url: Platform.DevToolsPath.UrlString,
9797
onWebSocketDisconnect: (connectionLostDetails?: {reason?: string, code?: string, errorType?: string}) => void) {
98-
9998
this.#socket = new WebSocket(url);
10099
this.#socket.onerror = this.onError.bind(this);
101100
this.#socket.onopen = this.onOpen.bind(this);
@@ -123,7 +122,8 @@ export class WebSocketConnection implements ProtocolClient.InspectorBackend.Conn
123122

124123
private onError(event: Event): void {
125124
if (this.#onWebSocketDisconnect) {
126-
this.#onWebSocketDisconnect.call(null, {reason: i18nString(UIStrings.websocketDisconnected), errorType: event.type});
125+
this.#onWebSocketDisconnect.call(
126+
null, {reason: i18nString(UIStrings.websocketDisconnected), errorType: event.type});
127127
}
128128
if (this.#onDisconnect) {
129129
// This is called if error occurred while connecting.
@@ -279,14 +279,16 @@ export class ParallelConnection implements ParallelConnectionInterface {
279279

280280
export async function initMainConnection(
281281
createRootTarget: () => Promise<void>,
282-
onConnectionLost: (connectionLostDetails?: {reason?: string, code?: string, errorType?: string}) => void): Promise<void> {
282+
onConnectionLost: (connectionLostDetails?: {reason?: string, code?: string, errorType?: string}) =>
283+
void): Promise<void> {
283284
ProtocolClient.InspectorBackend.Connection.setFactory(createMainConnection.bind(null, onConnectionLost));
284285
await createRootTarget();
285286
Host.InspectorFrontendHost.InspectorFrontendHostInstance.connectionReady();
286287
}
287288

288-
function createMainConnection(onConnectionLost: (connectionLostDetails?: {reason?: string, code?: string, errorType?: string}) => void):
289-
ProtocolClient.InspectorBackend.Connection {
289+
function createMainConnection(
290+
onConnectionLost: (connectionLostDetails?: {reason?: string, code?: string, errorType?: string}) =>
291+
void): ProtocolClient.InspectorBackend.Connection {
290292
if (Root.Runtime.getPathName().includes('rehydrated_devtools_app')) {
291293
return new RehydratingConnection(onConnectionLost);
292294
}

front_end/core/sdk/PageResourceLoader.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
304304
try {
305305
if (initiator.target) {
306306
Host.userMetrics.developerResourceLoaded(
307-
Host.UserMetrics.DeveloperResourceLoaded.LOAD_THROUGH_PAGE_VIA_TARGET);
308-
Host.rnPerfMetrics.developerResourceLoadingStarted(
307+
Host.UserMetrics.DeveloperResourceLoaded.LOAD_THROUGH_PAGE_VIA_TARGET);
308+
Host.rnPerfMetrics.developerResourceLoadingStarted(
309309
parsedURL, Host.UserMetrics.DeveloperResourceLoaded.LOAD_THROUGH_PAGE_VIA_TARGET);
310310
const result = await this.loadFromTarget(initiator.target, initiator.frameId, url);
311311
Host.rnPerfMetrics.developerResourceLoadingFinished(
@@ -314,7 +314,8 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
314314
}
315315
const frame = FrameManager.instance().getFrame(initiator.frameId);
316316
if (frame) {
317-
Host.userMetrics.developerResourceLoaded(Host.UserMetrics.DeveloperResourceLoaded.LOAD_THROUGH_PAGE_VIA_FRAME);
317+
Host.userMetrics.developerResourceLoaded(
318+
Host.UserMetrics.DeveloperResourceLoaded.LOAD_THROUGH_PAGE_VIA_FRAME);
318319
Host.rnPerfMetrics.developerResourceLoadingStarted(
319320
parsedURL, Host.UserMetrics.DeveloperResourceLoaded.LOAD_THROUGH_PAGE_VIA_FRAME);
320321
const result = await this.loadFromTarget(frame.resourceTreeModel().target(), initiator.frameId, url);

front_end/core/sdk/RehydratingConnection.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,14 @@ export class RehydratingConnection implements ProtocolClient.InspectorBackend.Co
6868
onMessage: ((arg0: Object) => void)|null = null;
6969
trace: TraceFile|null = null;
7070
sessions = new Map<number, RehydratingSessionBase>();
71-
#onConnectionLost: (connectionLostDetails?: {reason?: Platform.UIString.LocalizedString, code?: string, errorType?: string}) => void;
71+
#onConnectionLost:
72+
(connectionLostDetails?: {reason?: Platform.UIString.LocalizedString, code?: string, errorType?: string}) => void;
7273
#rehydratingWindow: Window&typeof globalThis;
7374
#onReceiveHostWindowPayloadBound = this.#onReceiveHostWindowPayload.bind(this);
7475

75-
constructor(onConnectionLost: (connectionLostDetails?: {reason?: Platform.UIString.LocalizedString, code?: string, errorType?: string}) => void) {
76+
constructor(
77+
onConnectionLost: (connectionLostDetails?:
78+
{reason?: Platform.UIString.LocalizedString, code?: string, errorType?: string}) => void) {
7679
// If we're invoking this class, we're in the rehydrating pop-up window. Rename window for clarity.
7780
this.#onConnectionLost = onConnectionLost;
7881
this.#rehydratingWindow = window;

front_end/entrypoints/rn_fusebox/FuseboxReconnectDeviceButton.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined
2424

2525
let connectionStatusIndicatorInstance: FuseboxReconnectDeviceButton;
2626

27-
export class FuseboxReconnectDeviceButton extends SDK.TargetManager.Observer implements
28-
UI.Toolbar.Provider {
27+
export class FuseboxReconnectDeviceButton extends SDK.TargetManager.Observer implements UI.Toolbar.Provider {
2928
#button = new UI.Toolbar.ToolbarButton('');
3029

3130
private constructor() {

0 commit comments

Comments
 (0)