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

Side by Side Diff: lib/src/runner/browser/browser.dart

Issue 1257953008: Expose content shell's remote debugging URL. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « lib/src/runner.dart ('k') | lib/src/runner/browser/browser_manager.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.runner.browser.browser; 5 library test.runner.browser.browser;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:stack_trace/stack_trace.dart'; 10 import 'package:stack_trace/stack_trace.dart';
(...skipping 14 matching lines...) Expand all
25 abstract class Browser { 25 abstract class Browser {
26 String get name; 26 String get name;
27 27
28 /// The Observatory URL for this browser. 28 /// The Observatory URL for this browser.
29 /// 29 ///
30 /// This will throw an [UnsupportedError] for browsers that aren't running the 30 /// This will throw an [UnsupportedError] for browsers that aren't running the
31 /// Dart VM, and return `null` if the Observatory URL can't be found. 31 /// Dart VM, and return `null` if the Observatory URL can't be found.
32 Future<Uri> get observatoryUrl => 32 Future<Uri> get observatoryUrl =>
33 throw new UnsupportedError("$name doesn't support Observatory."); 33 throw new UnsupportedError("$name doesn't support Observatory.");
34 34
35 /// The remote debugger URL for this browser.
36 ///
37 /// This will throw an [UnsupportedError] for browsers that don't support
38 /// remote debugging, and return `null` if the remote debugging URL can't be
39 /// found.
40 Future<Uri> get remoteDebuggerUrl =>
41 throw new UnsupportedError("$name doesn't support remote debugging.");
42
35 /// The underlying process. 43 /// The underlying process.
36 /// 44 ///
37 /// This will fire once the process has started successfully. 45 /// This will fire once the process has started successfully.
38 Future<Process> get _process => _processCompleter.future; 46 Future<Process> get _process => _processCompleter.future;
39 final _processCompleter = new Completer<Process>(); 47 final _processCompleter = new Completer<Process>();
40 48
41 /// Whether [close] has been called. 49 /// Whether [close] has been called.
42 var _closed = false; 50 var _closed = false;
43 51
44 /// A future that completes when the browser exits. 52 /// A future that completes when the browser exits.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 /// Returns the same [Future] as [onExit], except that it won't emit 112 /// Returns the same [Future] as [onExit], except that it won't emit
105 /// exceptions. 113 /// exceptions.
106 Future close() { 114 Future close() {
107 _closed = true; 115 _closed = true;
108 _process.then((process) => process.kill()); 116 _process.then((process) => process.kill());
109 117
110 // Swallow exceptions. The user should explicitly use [onExit] for these. 118 // Swallow exceptions. The user should explicitly use [onExit] for these.
111 return onExit.catchError((_) {}); 119 return onExit.catchError((_) {});
112 } 120 }
113 } 121 }
OLDNEW
« no previous file with comments | « lib/src/runner.dart ('k') | lib/src/runner/browser/browser_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698