From 426a7719cd08fb5891a49293102ee1b17815cc08 Mon Sep 17 00:00:00 2001 From: Leonardo Leite de Melo Date: Mon, 2 Mar 2026 18:11:56 -0300 Subject: [PATCH 1/3] fix: upgrade chrome 120+, java 17 and gradlew 8 --- build-tools/protocol.json | 36337 +++++++++++++--- build.gradle | 2 +- gradle.properties | 40 +- gradle/wrapper/gradle-wrapper.properties | 4 +- release.gradle | 145 +- stetho-okhttp/build.gradle | 31 +- .../stetho/okhttp/StethoInterceptorTest.java | 4 +- .../src/test/resources/robolectric.properties | 3 + stetho-okhttp3/build.gradle | 39 +- .../stetho/okhttp3/StethoInterceptorTest.java | 110 +- .../src/test/resources/robolectric.properties | 3 + stetho-timber/src/main/AndroidManifest.xml | 2 +- stetho/build.gradle | 28 +- .../main/java/com/facebook/stetho/Stetho.java | 4 + .../inspector/ChromeDiscoveryHandler.java | 16 +- .../inspector/protocol/module/Browser.java | 100 + .../inspector/protocol/module/Target.java | 121 + .../stetho/websocket/WebSocketHandler.java | 23 +- .../facebook/stetho/PluginBuilderTest.java | 2 +- .../elements/android/MethodInvokerTest.java | 2 +- .../elements/android/ViewDescriptorTest.java | 8 +- .../AsyncPrettyPrintResponseBodyTest.java | 2 +- .../ResponseHandlingInputStreamTest.java | 36 +- .../stetho/json/ObjectMapperTest.java | 2 +- .../src/test/resources/robolectric.properties | 3 + 25 files changed, 31784 insertions(+), 5283 deletions(-) create mode 100644 stetho-okhttp/src/test/resources/robolectric.properties create mode 100644 stetho-okhttp3/src/test/resources/robolectric.properties create mode 100644 stetho/src/main/java/com/facebook/stetho/inspector/protocol/module/Browser.java create mode 100644 stetho/src/main/java/com/facebook/stetho/inspector/protocol/module/Target.java create mode 100644 stetho/src/test/resources/robolectric.properties diff --git a/build-tools/protocol.json b/build-tools/protocol.json index a5f3801b..2c17893b 100644 --- a/build-tools/protocol.json +++ b/build-tools/protocol.json @@ -1,5086 +1,31263 @@ + { - "version": { "major": "1", "minor": "1" }, - "domains": [{ - "domain": "Inspector", - "hidden": true, - "types": [], - "commands": [ - { - "name": "enable", - "description": "Enables inspector domain notifications.", - "handlers": ["browser", "renderer"] - }, - { - "name": "disable", - "description": "Disables inspector domain notifications." - } - ], - "events": [ - { - "name": "evaluateForTestInFrontend", - "parameters": [ - { "name": "testCallId", "type": "integer" }, - { "name": "script", "type": "string" } - ] - }, - { - "name": "inspect", - "parameters": [ - { "name": "object", "$ref": "Runtime.RemoteObject" }, - { "name": "hints", "type": "object" } - ] - }, - { - "name": "detached", - "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.", - "parameters": [ - { "name": "reason", "type": "string", "description": "The reason why connection has been terminated." } - ], - "handlers": ["browser"] - }, - { - "name": "targetCrashed", - "description": "Fired when debugging target has crashed", - "handlers": ["browser"] - } - ] - }, - { - "domain": "Memory", - "hidden": true, - "commands": [ - { - "name": "getDOMCounters", - "returns": [ - { "name": "documents", "type": "integer" }, - { "name": "nodes", "type": "integer" }, - { "name": "jsEventListeners", "type": "integer" } - ] - } - ] + "version": { + "major": "1", + "minor": "3" }, - { - "domain": "Page", - "description": "Actions and events related to the inspected page belong to the page domain.", - "types": [ - { - "id": "ResourceType", - "type": "string", - "enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "WebSocket", "Other"], - "description": "Resource type as it was perceived by the rendering engine." - }, - { - "id": "FrameId", - "type": "string", - "description": "Unique frame identifier." - }, - { - "id": "Frame", - "type": "object", - "description": "Information about the Frame on the page.", - "properties": [ - { "name": "id", "type": "string", "description": "Frame unique identifier." }, - { "name": "parentId", "type": "string", "optional": true, "description": "Parent frame identifier." }, - { "name": "loaderId", "$ref": "Network.LoaderId", "description": "Identifier of the loader associated with this frame." }, - { "name": "name", "type": "string", "optional": true, "description": "Frame's name as specified in the tag." }, - { "name": "url", "type": "string", "description": "Frame document's URL." }, - { "name": "securityOrigin", "type": "string", "description": "Frame document's security origin." }, - { "name": "mimeType", "type": "string", "description": "Frame document's mimeType as determined by the browser." } - ] - }, - { - "id": "FrameResourceTree", - "type": "object", - "description": "Information about the Frame hierarchy along with their cached resources.", - "properties": [ - { "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." }, - { "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameResourceTree" }, "description": "Child frames." }, - { "name": "resources", "type": "array", - "items": { - "type": "object", - "properties": [ - { "name": "url", "type": "string", "description": "Resource URL." }, - { "name": "type", "$ref": "ResourceType", "description": "Type of this resource." }, - { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." }, - { "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load." }, - { "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading." } + "domains": [ + { + "domain": "Accessibility", + "experimental": true, + "dependencies": [ + "DOM" + ], + "types": [ + { + "id": "AXNodeId", + "description": "Unique accessibility node identifier.", + "type": "string" + }, + { + "id": "AXValueType", + "description": "Enum of possible property types.", + "type": "string", + "enum": [ + "boolean", + "tristate", + "booleanOrUndefined", + "idref", + "idrefList", + "integer", + "node", + "nodeList", + "number", + "string", + "computedString", + "token", + "tokenList", + "domRelation", + "role", + "internalRole", + "valueUndefined" + ] + }, + { + "id": "AXValueSourceType", + "description": "Enum of possible property sources.", + "type": "string", + "enum": [ + "attribute", + "implicit", + "style", + "contents", + "placeholder", + "relatedElement" + ] + }, + { + "id": "AXValueNativeSourceType", + "description": "Enum of possible native property sources (as a subtype of a particular AXValueSourceType).", + "type": "string", + "enum": [ + "description", + "figcaption", + "label", + "labelfor", + "labelwrapped", + "legend", + "rubyannotation", + "tablecaption", + "title", + "other" + ] + }, + { + "id": "AXValueSource", + "description": "A single source for a computed AX property.", + "type": "object", + "properties": [ + { + "name": "type", + "description": "What type of source this is.", + "$ref": "AXValueSourceType" + }, + { + "name": "value", + "description": "The value of this property source.", + "optional": true, + "$ref": "AXValue" + }, + { + "name": "attribute", + "description": "The name of the relevant attribute, if any.", + "optional": true, + "type": "string" + }, + { + "name": "attributeValue", + "description": "The value of the relevant attribute, if any.", + "optional": true, + "$ref": "AXValue" + }, + { + "name": "superseded", + "description": "Whether this source is superseded by a higher priority source.", + "optional": true, + "type": "boolean" + }, + { + "name": "nativeSource", + "description": "The native markup source for this value, e.g. a `