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

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

Issue 1265333002: Only fetch the Observatory URL in debug mode. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/src/runner/browser/content_shell.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/browser/browser_manager.dart
diff --git a/lib/src/runner/browser/browser_manager.dart b/lib/src/runner/browser/browser_manager.dart
index d602be814f68d32d644f5d159b8a37e171ad24ba..321c1f78c8f88190060a9f8cd3de6bc95b51ba1e 100644
--- a/lib/src/runner/browser/browser_manager.dart
+++ b/lib/src/runner/browser/browser_manager.dart
@@ -81,13 +81,14 @@ class BrowserManager {
///
/// [url] should serve a page that establishes a WebSocket connection with
/// this process. That connection, once established, should be emitted via
- /// [future].
+ /// [future]. If [debug] is true, starts the browser in debug mode, with its
+ /// debugger interfaces on and detected.
///
/// Returns the browser manager, or throws an [ApplicationException] if a
/// connection fails to be established.
static Future<BrowserManager> start(TestPlatform platform, Uri url,
- Future<CompatibleWebSocket> future) {
- var browser = _newBrowser(url, platform);
+ Future<CompatibleWebSocket> future, {bool debug: false}) {
+ var browser = _newBrowser(url, platform, debug: debug);
var completer = new Completer();
@@ -118,10 +119,14 @@ class BrowserManager {
}
/// Starts the browser identified by [browser] and has it load [url].
- static Browser _newBrowser(Uri url, TestPlatform browser) {
+ ///
+ /// If [debug] is true, starts the browser in debug mode.
+ static Browser _newBrowser(Uri url, TestPlatform browser,
+ {bool debug: false}) {
switch (browser) {
- case TestPlatform.dartium: return new Dartium(url);
- case TestPlatform.contentShell: return new ContentShell(url);
+ case TestPlatform.dartium: return new Dartium(url, debug: debug);
+ case TestPlatform.contentShell:
+ return new ContentShell(url, debug: debug);
case TestPlatform.chrome: return new Chrome(url);
case TestPlatform.phantomJS: return new PhantomJS(url);
case TestPlatform.firefox: return new Firefox(url);
« no previous file with comments | « no previous file | lib/src/runner/browser/content_shell.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698