[flutter_tools] reland remove flutter view cache (#56387)
Fixes #56194 Remove caching of FlutterView and poll forever if the list of flutter views is empty. Added test for missing release mode logic.
This commit is contained in:
@@ -239,7 +239,6 @@ class FakeVmServiceHost {
|
||||
final FakeVmServiceRequest fakeRequest = _requests.removeAt(0) as FakeVmServiceRequest;
|
||||
expect(request, isA<Map<String, Object>>()
|
||||
.having((Map<String, Object> request) => request['method'], 'method', fakeRequest.method)
|
||||
.having((Map<String, Object> request) => request['id'], 'id', fakeRequest.id)
|
||||
.having((Map<String, Object> request) => request['params'], 'args', fakeRequest.args)
|
||||
);
|
||||
if (fakeRequest.close) {
|
||||
@@ -250,13 +249,13 @@ class FakeVmServiceHost {
|
||||
if (fakeRequest.errorCode == null) {
|
||||
_input.add(json.encode(<String, Object>{
|
||||
'jsonrpc': '2.0',
|
||||
'id': fakeRequest.id,
|
||||
'id': request['id'],
|
||||
'result': fakeRequest.jsonResponse ?? <String, Object>{'type': 'Success'},
|
||||
}));
|
||||
} else {
|
||||
_input.add(json.encode(<String, Object>{
|
||||
'jsonrpc': '2.0',
|
||||
'id': fakeRequest.id,
|
||||
'id': request['id'],
|
||||
'error': <String, Object>{
|
||||
'code': fakeRequest.errorCode,
|
||||
}
|
||||
@@ -299,7 +298,6 @@ abstract class VmServiceExpectation {
|
||||
class FakeVmServiceRequest implements VmServiceExpectation {
|
||||
const FakeVmServiceRequest({
|
||||
@required this.method,
|
||||
@required this.id,
|
||||
this.args = const <String, Object>{},
|
||||
this.jsonResponse,
|
||||
this.errorCode,
|
||||
@@ -307,7 +305,6 @@ class FakeVmServiceRequest implements VmServiceExpectation {
|
||||
});
|
||||
|
||||
final String method;
|
||||
final String id;
|
||||
|
||||
/// When true, the vm service is automatically closed.
|
||||
final bool close;
|
||||
|
||||
Reference in New Issue
Block a user