Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
883d6ead
Unverified
Commit
883d6ead
authored
Jun 26, 2019
by
Todd Volkert
Committed by
GitHub
Jun 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More `HttpClientResponse implements Stream<Uint8List>` fixes (#35149)
https://github.com/dart-lang/sdk/issues/36900
parent
3ead8a40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
net_test.dart
packages/flutter_tools/test/base/net_test.dart
+6
-1
create_test.dart
packages/flutter_tools/test/commands/create_test.dart
+7
-1
No files found.
packages/flutter_tools/test/base/net_test.dart
View file @
883d6ead
...
...
@@ -233,7 +233,7 @@ class MockHttpClientRequest implements io.HttpClientRequest {
}
}
class
MockHttpClientResponse
extends
Stream
<
List
<
int
>>
implements
io
.
HttpClientResponse
{
class
MockHttpClientResponse
implements
io
.
HttpClientResponse
{
MockHttpClientResponse
(
this
.
statusCode
);
@override
...
...
@@ -253,6 +253,11 @@ class MockHttpClientResponse extends Stream<List<int>> implements io.HttpClientR
.
listen
(
onData
,
onError:
onError
,
onDone:
onDone
,
cancelOnError:
cancelOnError
);
}
@override
Future
<
dynamic
>
forEach
(
void
Function
(
Uint8List
element
)
action
)
{
return
Future
<
void
>.
error
(
const
io
.
SocketException
(
'test'
));
}
@override
dynamic
noSuchMethod
(
Invocation
invocation
)
{
throw
'io.HttpClientResponse -
$invocation
'
;
...
...
packages/flutter_tools/test/commands/create_test.dart
View file @
883d6ead
...
...
@@ -1286,7 +1286,7 @@ class MockHttpClientRequest implements HttpClientRequest {
}
}
class
MockHttpClientResponse
extends
Stream
<
List
<
int
>>
implements
HttpClientResponse
{
class
MockHttpClientResponse
implements
HttpClientResponse
{
MockHttpClientResponse
(
this
.
statusCode
,
{
this
.
result
});
@override
...
...
@@ -1313,6 +1313,12 @@ class MockHttpClientResponse extends Stream<List<int>> implements HttpClientResp
.
listen
(
onData
,
onError:
onError
,
onDone:
onDone
,
cancelOnError:
cancelOnError
);
}
@override
Future
<
dynamic
>
forEach
(
void
Function
(
Uint8List
element
)
action
)
{
action
(
Uint8List
.
fromList
(
result
.
codeUnits
));
return
Future
<
void
>.
value
();
}
@override
dynamic
noSuchMethod
(
Invocation
invocation
)
{
throw
'io.HttpClientResponse -
$invocation
'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment