dart-sdk/tests
Sigmund Cherem 07675de0c0 Fix type error within _EventStream.onData
The constructor was wrapping the onData handler to hide the type-mismatch. This
copies the same logic to the onData handler.

In non-nnbd code this code was not exercised. The migration of dart:async
made this code reachable on our tests. That's because Stream.first used to
do:

  var subscription;
  this.listen(() => ... cancel subscription here, ...)

it now avoids making subscription nullable by registering the onData handler
later:

  var subscrition = stream.listen(null, ...);
  subscription.onData(() => ... cancel subscription here);

This change fixes the following 6 html tests under nnbd:
html/history_test/history/history
html/transferables_test
html/transition_event_test
html/websocket_test
html/worker_test/functional/functional
html/xhr_test


Change-Id: I095ea8d545e65b047504af0367586884bba84d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134120
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-02-02 05:58:24 +00:00
..
angular
co19
co19_2 Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
compiler Fix type error within _EventStream.onData 2020-02-02 05:58:24 +00:00
corelib Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
corelib_2 Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
dart
ffi [vm/ffi] Split FFI tests in NNBD and legacy 2020-01-29 14:04:41 +00:00
ffi_2 [vm/ffi] Split FFI tests in NNBD and legacy 2020-01-29 14:04:41 +00:00
kernel
language Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
language_2 Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
lib Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
lib_2 Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
modular
search
standalone Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
standalone_2 Update all Slow tests to be Slow, Pass. 2020-02-01 00:17:42 +00:00
legacy_status_dart2js.csv
light_unittest.dart
README.md

This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.