Skip to content

Commit 68a0614

Browse files
[espresso] Replace deprecated getObservatoryUri (#5788)
Replaces the deprecated `getObservatoryUri` with the newer `getVMServiceUri` now that this package requires 3.10, where it was introduced. The methods have exactly the same implementation, so this is a no-op behaviorally. Fixes flutter/flutter#131708
1 parent e4cbf23 commit 68a0614

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

packages/espresso/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 0.3.0+7
22

3+
* Replaces call to deprecated `getObservatoryUri`.
34
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
45

56
## 0.3.0+6

packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterViewAction.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,8 @@ public void perform(UiController uiController, View flutterView) {
105105
// The url {@code FlutterNativeView} returns is the http url that the Dart VM Observatory http
106106
// server serves at. Need to convert to the one that the WebSocket uses.
107107

108-
// TODO(stuartmorgan): migrate to getVMServiceUri() once that is available on stable.
109-
@SuppressWarnings("deprecation")
110108
URI dartVmServiceProtocolUrl =
111-
DartVmServiceUtil.getServiceProtocolUri(FlutterJNI.getObservatoryUri());
109+
DartVmServiceUtil.getServiceProtocolUri(FlutterJNI.getVMServiceUri());
112110
String isolateId = DartVmServiceUtil.getDartIsolateId(flutterView);
113111
final FlutterTestingProtocol flutterTestingProtocol =
114112
new DartVmService(

packages/espresso/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Java classes for testing Flutter apps using Espresso.
33
Allows driving Flutter widgets from a native Espresso test.
44
repository: https://github.com/flutter/packages/tree/main/packages/espresso
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+espresso%22
6-
version: 0.3.0+6
6+
version: 0.3.0+7
77

88
environment:
99
sdk: ">=3.0.0 <4.0.0"

0 commit comments

Comments
 (0)