Migrated test block 179 to Dart 2.0.

Some changes were required to stream_transformer_test to make it strong
mode clean. Other minor changes involved migrating from unittest->test.

Bug:
Change-Id: Ia21144090710137e4803c651cf9e3fd62e17f5f7
Reviewed-on: https://dart-review.googlesource.com/3707
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
diff --git a/tests/lib_strong/async/stream_transformer_from_handlers_test.dart b/tests/lib_2/async/stream_transformer_from_handlers_test.dart
similarity index 96%
rename from tests/lib_strong/async/stream_transformer_from_handlers_test.dart
rename to tests/lib_2/async/stream_transformer_from_handlers_test.dart
index cf54dc8..5363774 100644
--- a/tests/lib_strong/async/stream_transformer_from_handlers_test.dart
+++ b/tests/lib_2/async/stream_transformer_from_handlers_test.dart
@@ -34,7 +34,7 @@
   var stackTrace = currentStackTrace;
   var events = [];
   var controller;
-  controller = new StreamController(onListen: () {
+  controller = new StreamController<int>(onListen: () {
     controller.add(499);
     controller.addError(42, stackTrace);
     controller.close();
diff --git a/tests/lib_strong/async/stream_transformer_test.dart b/tests/lib_2/async/stream_transformer_test.dart
similarity index 93%
rename from tests/lib_strong/async/stream_transformer_test.dart
rename to tests/lib_2/async/stream_transformer_test.dart
index 7ebffbe..f1b850d 100644
--- a/tests/lib_strong/async/stream_transformer_test.dart
+++ b/tests/lib_2/async/stream_transformer_test.dart
@@ -3,9 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:async_helper/async_helper.dart';
 import 'dart:async';
-import 'event_helper.dart';
 
 _defaultData(x) {}
 _defaultError(e, [st]) {}
@@ -38,7 +36,7 @@
   void resume() {}
 
   final isPaused = false;
-  Future asFuture([var futureValue]) => null;
+  Future<E> asFuture<E>([E futureValue]) => null;
 }
 
 main() {
@@ -46,7 +44,7 @@
       (stream, cancelOnError) =>
           new MyStreamSubscription(stream, cancelOnError));
 
-  var controller = new StreamController(sync: true);
+  var controller = new StreamController<int>(sync: true);
   var stream = controller.stream;
   var transformed = stream.transform(transformer);
 
@@ -54,7 +52,7 @@
   var handleError = (e, st) => 42;
   var handleDone = () => 99;
 
-  var subscription =
+  MyStreamSubscription<String> subscription =
       transformed.listen(handleData, onError: handleError, onDone: handleDone);
 
   Expect.identical(stream, subscription.stream);
diff --git a/tests/lib_strong/async/stream_type_test.dart b/tests/lib_2/async/stream_type_test.dart
similarity index 100%
rename from tests/lib_strong/async/stream_type_test.dart
rename to tests/lib_2/async/stream_type_test.dart
diff --git a/tests/lib_strong/async/stream_view_test.dart b/tests/lib_2/async/stream_view_test.dart
similarity index 100%
rename from tests/lib_strong/async/stream_view_test.dart
rename to tests/lib_2/async/stream_view_test.dart
diff --git a/tests/lib_strong/async/stream_zones_test.dart b/tests/lib_2/async/stream_zones_test.dart
similarity index 100%
rename from tests/lib_strong/async/stream_zones_test.dart
rename to tests/lib_2/async/stream_zones_test.dart
diff --git a/tests/lib_strong/async/timer_cancel1_test.dart b/tests/lib_2/async/timer_cancel1_test.dart
similarity index 94%
rename from tests/lib_strong/async/timer_cancel1_test.dart
rename to tests/lib_2/async/timer_cancel1_test.dart
index fdd806e..bd40160 100644
--- a/tests/lib_strong/async/timer_cancel1_test.dart
+++ b/tests/lib_2/async/timer_cancel1_test.dart
@@ -5,7 +5,7 @@
 library timer_cancel1_test;
 
 import 'dart:async';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 main() {
   // Test that a timeout handler can cancel another.
diff --git a/tests/lib_strong/async/timer_cancel2_test.dart b/tests/lib_2/async/timer_cancel2_test.dart
similarity index 93%
rename from tests/lib_strong/async/timer_cancel2_test.dart
rename to tests/lib_2/async/timer_cancel2_test.dart
index ac1460d..f8f3892 100644
--- a/tests/lib_strong/async/timer_cancel2_test.dart
+++ b/tests/lib_2/async/timer_cancel2_test.dart
@@ -5,7 +5,7 @@
 library timer_cancel2_test;
 
 import 'dart:async';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 main() {
   // Test that a timeout handler can cancel itself.
diff --git a/tests/lib_strong/async/timer_cancel_test.dart b/tests/lib_2/async/timer_cancel_test.dart
similarity index 96%
rename from tests/lib_strong/async/timer_cancel_test.dart
rename to tests/lib_2/async/timer_cancel_test.dart
index d539cb7..4a360dd 100644
--- a/tests/lib_strong/async/timer_cancel_test.dart
+++ b/tests/lib_2/async/timer_cancel_test.dart
@@ -5,7 +5,7 @@
 library timer_cancel_test;
 
 import 'dart:async';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 main() {
   final ms = const Duration(milliseconds: 1);
diff --git a/tests/lib_strong/async/timer_isActive_test.dart b/tests/lib_2/async/timer_isActive_test.dart
similarity index 96%
rename from tests/lib_strong/async/timer_isActive_test.dart
rename to tests/lib_2/async/timer_isActive_test.dart
index b116d7f..6fe0edb 100644
--- a/tests/lib_strong/async/timer_isActive_test.dart
+++ b/tests/lib_2/async/timer_isActive_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 main() {
   test("timer isActive test", () {
diff --git a/tests/lib_strong/async/timer_regress22626_test.dart b/tests/lib_2/async/timer_regress22626_test.dart
similarity index 100%
rename from tests/lib_strong/async/timer_regress22626_test.dart
rename to tests/lib_2/async/timer_regress22626_test.dart
diff --git a/tests/lib_strong/async/timer_repeat_test.dart b/tests/lib_2/async/timer_repeat_test.dart
similarity index 96%
rename from tests/lib_strong/async/timer_repeat_test.dart
rename to tests/lib_2/async/timer_repeat_test.dart
index c4261d3..a3763bf 100644
--- a/tests/lib_strong/async/timer_repeat_test.dart
+++ b/tests/lib_2/async/timer_repeat_test.dart
@@ -5,7 +5,7 @@
 library timer_repeat_test;
 
 import 'dart:async';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 const Duration TIMEOUT = const Duration(milliseconds: 500);
 const int ITERATIONS = 5;
diff --git a/tests/lib_2/lib_2.status b/tests/lib_2/lib_2.status
index e7e51b9..7d5f50c 100644
--- a/tests/lib_2/lib_2.status
+++ b/tests/lib_2/lib_2.status
@@ -17,10 +17,11 @@
 async/multiple_timer_test: Pass, Fail # Timing related
 
 [ $runtime == chrome && $system == macos ]
+async/catch_errors11_test: Pass, Timeout # Issue 22696
+async/catch_errors11_test: Pass, Timeout # Issue 22696
 async/slow_consumer_test: Pass, Timeout # Issue 22696
-async/catch_errors11_test: Pass, Timeout # Issue 22696
-async/catch_errors11_test: Pass, Timeout # Issue 22696
 convert/streamed_conversion_utf8_encode_test: SkipSlow # Times out. Issue 22050
+async/timer_isActive_test: Fail, Pass, Timeout # Issue 22696
 html/canvasrenderingcontext2d_test/drawImage_video_element: Skip # Times out. Please triage this failure.
 html/canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Skip # Times out. Please triage this failure.
 html/custom_elements_test: Pass, Timeout # Issue 26789
@@ -32,6 +33,7 @@
 async/stream_timeout_test: SkipSlow # Times out. Issue 22050
 
 [ $hot_reload || $hot_reload_rollback ]
+async/stream_transformer_test: Pass, Fail # Closure identity
 isolate/function_send_test: Pass, Fail # Closure identity
 isolate/issue_21398_parent_isolate2_test: Crash # Requires deferred libraries
 mirrors/closurization_equivalence_test: SkipByDesign # Method equality
@@ -48,8 +50,8 @@
 convert/streamed_conversion_utf8_decode_test: Pass, Slow  # Issue 12029
 
 [ $runtime == safari || $runtime == safarimobilesim ]
-typed_data/float32x4_test: Fail, Pass # Safari has an optimization bug (nightlies are already fine).
 convert/json_test: Fail # https://bugs.webkit.org/show_bug.cgi?id=134920
+typed_data/float32x4_test: Fail, Pass # Safari has an optimization bug (nightlies are already fine).
 typed_data/int32x4_test: Fail, Pass # Safari has an optimization bug (nightlies are already fine).
 html/canvasrenderingcontext2d_test/drawImage_video_element: Fail # Safari does not support drawImage w/ video element
 html/canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Fail # Safari does not support drawImage w/ video element
@@ -119,6 +121,7 @@
 html/canvasrenderingcontext2d_test/arc: Pass, Fail # Pixel unexpected value. Please triage this failure.
 html/canvasrenderingcontext2d_test/drawImage_video_element: Fail # IE does not support drawImage w/ video element
 html/canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Fail # IE does not support drawImage w/ video element
-
-[ $runtime == ie11 ]
 html/custom/document_register_type_extensions_test/single-parameter: Fail # Issue 13193.
+
+[ $hot_reload ]
+async/timer_regress22626_test: Pass, RuntimeError # Timing dependent.
diff --git a/tests/lib_2/lib_2_dart2js.status b/tests/lib_2/lib_2_dart2js.status
index becab3a..5c2fdfb 100644
--- a/tests/lib_2/lib_2_dart2js.status
+++ b/tests/lib_2/lib_2_dart2js.status
@@ -25,6 +25,7 @@
 async/schedule_microtask3_test: RuntimeError
 async/stream_controller_test: Fail # Timer interface not supported: Issue 7728.
 async/stream_take_test: Fail # Timer interface not supported: Issue 7728.
+async/timer_regress22626_test: RuntimeError # Non-zero timers not supported; Issue 7728.
 async/zone_empty_description2_test: RuntimeError # Timer interface not supported: Issue 7728.
 async/zone_create_timer2_test: RuntimeError # Timer interface not supported: Issue 7728.
 async/zone_create_periodic_timer_test: RuntimeError # Timer interface not supported: Issue 7728.
diff --git a/tests/lib_2/lib_2_dartdevc.status b/tests/lib_2/lib_2_dartdevc.status
index 6b85a39..cba894f 100644
--- a/tests/lib_2/lib_2_dartdevc.status
+++ b/tests/lib_2/lib_2_dartdevc.status
@@ -56,4 +56,3 @@
 [ $compiler == dartdevc && $runtime == drt ]
 math/math_test: RuntimeError # Issue 29922
 math/math2_test: RuntimeError # Issue 29922
-
diff --git a/tests/lib_2/lib_2_precompiled.status b/tests/lib_2/lib_2_precompiled.status
index a3552ee..842e70d 100644
--- a/tests/lib_2/lib_2_precompiled.status
+++ b/tests/lib_2/lib_2_precompiled.status
@@ -18,3 +18,6 @@
 isolate/isolate_complex_messages_test: SkipByDesign
 js/datetime_roundtrip_test: CompileTimeError
 js/null_test: CompileTimeError
+
+[ ($compiler == none || $compiler == precompiler || $compiler == app_jit) ]
+async/timer_regress22626_test: Pass, RuntimeError # Issue 28254
diff --git a/tests/lib_2/lib_2_vm.status b/tests/lib_2/lib_2_vm.status
index 648d689..a6b3221 100644
--- a/tests/lib_2/lib_2_vm.status
+++ b/tests/lib_2/lib_2_vm.status
@@ -33,6 +33,11 @@
 async/stream_transform_test: RuntimeError
 async/stream_transformation_broadcast_test: RuntimeError
 async/timer_test: RuntimeError
+async/timer_cancel1_test: RuntimeError
+async/timer_cancel2_test: RuntimeError
+async/timer_cancel_test: RuntimeError
+async/timer_isActive_test: RuntimeError
+async/timer_repeat_test: RuntimeError
 convert/json_lib_test: RuntimeError
 math/point_test: RuntimeError
 math/rectangle_test: RuntimeError
diff --git a/tests/lib_strong/async/timer_not_available_test.dart b/tests/lib_strong/async/timer_not_available_test.dart
deleted file mode 100644
index fcbcc13..0000000
--- a/tests/lib_strong/async/timer_not_available_test.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library timerNotAvailable;
-
-import 'package:expect/expect.dart';
-import 'dart:async';
-
-main() {
-  final ms = const Duration(milliseconds: 1);
-  bool failed = false;
-  try {
-    new Timer(ms * 5, () {});
-  } on UnsupportedError catch (e) {
-    failed = true;
-  }
-  Expect.isTrue(failed);
-  failed = false;
-  try {
-    var t = new Timer.periodic(ms * 10, (_) {});
-    t.cancel();
-  } on UnsupportedError catch (e) {
-    failed = true;
-  }
-  Expect.isTrue(failed);
-}
diff --git a/tests/lib_strong/lib_strong.status b/tests/lib_strong/lib_strong.status
index 392fb7f..9feff77 100644
--- a/tests/lib_strong/lib_strong.status
+++ b/tests/lib_strong/lib_strong.status
@@ -25,7 +25,6 @@
 async/future_value_chain4_test: Skip
 async/print_test/01: Skip
 async/print_test/none: Skip
-async/stream_transformer_test: Skip
 html/cross_frame_test: Skip
 html/element_dimensions_test: Skip
 html/element_test: Skip
@@ -91,8 +90,6 @@
 async/future_or_bad_type_test/none: RuntimeError # Issue 29922
 async/future_or_non_strong_test: RuntimeError # Issue 29922
 async/futures_test: RuntimeError # Issue 29922
-async/stream_transformer_from_handlers_test: RuntimeError # Issue 29922, strong mode cast failure
-async/timer_not_available_test: RuntimeError # Issue 29922
 html/async_spawnuri_test: RuntimeError # Issue 29922
 html/async_test: RuntimeError # Issue 29922
 html/element_classes_svg_test: RuntimeError # Issue 29922