Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Unified Diff: lib/src/runner/browser/dartium.dart

Issue 1960503002: Fix all strong-mode errors and warnings. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: .analysis_options Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/runner/browser/content_shell.dart ('k') | lib/src/runner/browser/phantom_js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/browser/dartium.dart
diff --git a/lib/src/runner/browser/dartium.dart b/lib/src/runner/browser/dartium.dart
index 15f78ba5a6b1d1ec2f04ca87de1fb8f91d827e26..1d829bc0f52bcbb39ec6b5225e4c2e3415070135 100644
--- a/lib/src/runner/browser/dartium.dart
+++ b/lib/src/runner/browser/dartium.dart
@@ -28,7 +28,7 @@ class Dartium extends Browser {
final Future<Uri> observatoryUrl;
factory Dartium(url, {String executable, bool debug: false}) {
- var completer = new Completer.sync();
+ var completer = new Completer<Uri>.sync();
return new Dartium._(() async {
if (executable == null) executable = _defaultExecutable();
@@ -113,7 +113,7 @@ class Dartium extends Browser {
/// the Observatory instance that actually contains an isolate, and returning
/// the corresponding URI.
static Future<Uri> _getObservatoryUrl(Stream<List<int>> stdout) async {
- var urlQueue = new StreamQueue(lineSplitter.bind(stdout).map((line) {
+ var urlQueue = new StreamQueue<Uri>(lineSplitter.bind(stdout).map((line) {
var match = _observatoryRegExp.firstMatch(line);
return match == null ? null : Uri.parse(match[1]);
}).where((line) => line != null));
@@ -122,7 +122,7 @@ class Dartium extends Browser {
urlQueue.next,
urlQueue.next,
urlQueue.next
- ].map(_checkObservatoryUrl);
+ ].map((future) => _checkObservatoryUrl(future));
urlQueue.cancel();
@@ -130,8 +130,8 @@ class Dartium extends Browser {
/// check whether it's actually connected to an isolate, indicating that
/// it's the observatory for the main page. Once we find the one that is, we
/// cancel the other requests and return it.
- return inCompletionOrder(operations)
- .firstWhere((url) => url != null, defaultValue: () => null);
+ return (await inCompletionOrder(operations)
+ .firstWhere((url) => url != null, defaultValue: () => null)) as Uri;
}
/// If the URL returned by [future] corresponds to the correct Observatory
@@ -142,7 +142,7 @@ class Dartium extends Browser {
static CancelableOperation<Uri> _checkObservatoryUrl(Future<Uri> future) {
var webSocket;
var canceled = false;
- var completer = new CancelableCompleter(onCancel: () {
+ var completer = new CancelableCompleter<Uri>(onCancel: () {
canceled = true;
if (webSocket != null) webSocket.close();
});
« no previous file with comments | « lib/src/runner/browser/content_shell.dart ('k') | lib/src/runner/browser/phantom_js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698