Handle uncaught error for warnIfSlow (#56418)

This commit is contained in:
Jia Hao
2020-05-06 23:16:03 +08:00
committed by GitHub
parent 6f0ed5e142
commit c2b7342ca4
2 changed files with 19 additions and 1 deletions

View File

@@ -665,6 +665,16 @@ void main() {
expect(error.message, 'Error in Flutter application: {message: This is a failure}');
}
});
test('uncaught remote error', () async {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
return Future<Map<String, dynamic>>.error(
rpc.RpcException(9999, 'test error'),
);
});
expect(driver.waitFor(find.byTooltip('foo')), throwsDriverError);
});
});
});