Commit 439aadf4 authored by yjbanov's avatar yjbanov

move to pub version of vm_service_client

parent b0e45594
......@@ -74,8 +74,8 @@ class FlutterDriver {
// Waits for a signal from the VM service that the extension is registered
Future waitForServiceExtension() {
return isolate.onServiceExtensionAdded.firstWhere((VMServiceExtension ext) {
return ext.method == _flutterExtensionMethod;
return isolate.onExtensionAdded.firstWhere((String extension) {
return extension == _flutterExtensionMethod;
});
}
......
......@@ -8,10 +8,7 @@ environment:
sdk: '>=1.12.0 <2.0.0'
dependencies:
vm_service_client:
git:
url: git://github.com/yjbanov/vm_service_client.git
ref: 54085d1
vm_service_client: '>=0.1.2 <1.0.0'
json_rpc_2: any
logging: '>=0.11.0 <1.0.0'
flutter:
......
......@@ -46,10 +46,8 @@ main() {
test('connects to isolate paused at start', () async {
when(mockIsolate.pauseEvent).thenReturn(new MockVMPauseStartEvent());
when(mockIsolate.resume()).thenReturn(new Future.value());
MockVMServiceExtension mockExtension = new MockVMServiceExtension();
when(mockExtension.method).thenReturn('ext.flutter_driver');
when(mockIsolate.onServiceExtensionAdded)
.thenReturn(new Stream.fromIterable([mockExtension]));
when(mockIsolate.onExtensionAdded)
.thenReturn(new Stream.fromIterable(['ext.flutter_driver']));
FlutterDriver driver = await FlutterDriver.connect();
expect(driver, isNotNull);
......@@ -203,6 +201,3 @@ class MockVMPauseBreakpointEvent extends Mock implements VMPauseBreakpointEvent
@proxy
class MockVMResumeEvent extends Mock implements VMResumeEvent { }
@proxy
class MockVMServiceExtension extends Mock implements VMServiceExtension { }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment