flutter/packages/flutter_test
Todd Volkert e8270ff661
Prepare for HttpClientResponse Uint8List SDK change (#34863)
* Prepare for HttpClientResponse Uint8List SDK change

An upcoming change in the Dart SDK will change `HttpClientResponse`
from implementing `Stream<List<int>>` to instead implement
`Stream<Uint8List>`.

This forwards-compatible change to `_MockHttpClientResponse` is being
made to allow for a smooth rollout of that SDK breaking change. The
current structure of the class is as follows:

```dart
_MockHttpClientResponse extends Stream<List<int>> implements HttpClientResponse {
  ...
}
```

This structure would require that the Dart SDK change land atomically
a change to the class (`extends Stream<Uint8List>`). This atomic landing
requirement doesn't play well at all with Flutter's roll model vis-a-vis
the Dart SDK's roll model to Google's internal repo.  As such, this commit
changes the structure of `_MockHttpClientResponse` to be:

```dart
_MockHttpClientResponse implements HttpClientResponse {
  final Stream<Uint8List> _delegate;

  ...
}
```

Once the Dart SDK change has fully rolled out, we can simplify this class
back to its former structure.

https://github.com/dart-lang/sdk/issues/36900

* Review comment
2019-06-21 17:01:32 -07:00
..
lib Prepare for HttpClientResponse Uint8List SDK change (#34863) 2019-06-21 17:01:32 -07:00
test add read only semantics flag (#34683) 2019-06-19 14:41:44 -07:00
BUILD.gn Leave source list empty for Fuchsia targets. (#15337) 2018-03-12 15:38:32 +01:00
pubspec.yaml Reland "Clean up some flutter_tools tests and roll dependencies" (#33225) 2019-05-29 19:04:35 -07:00