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

Side by Side Diff: tools/testing/dart/launch_browser.dart

Issue 2919573003: Revert "Revert "Replace the configuration map with a typed object."" (Closed)
Patch Set: Another test fix. Created 3 years, 6 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 | « tools/testing/dart/http_server.dart ('k') | tools/testing/dart/main.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /** 5 /**
6 * Simple command line interface to launching browsers. 6 * Simple command line interface to launching browsers.
7 * Uses the browser_controller framework. 7 * Uses the browser_controller framework.
8 * The usage is: 8 * The usage is:
9 * DARTBIN launch_browser.dart BROWSER_NAME URL 9 * DARTBIN launch_browser.dart BROWSER_NAME URL
10 * DARTBIN should be the checked in stable binary. 10 * DARTBIN should be the checked in stable binary.
11 */ 11 */
12 12
13 import "browser_controller.dart"; 13 import 'browser_controller.dart';
14 import "utils.dart"; 14 import 'configuration.dart';
15 15
16 void printHelp() { 16 void printHelp() {
17 print("Usage pattern:"); 17 print("Usage pattern:");
18 print("launch_browser.dart browser url"); 18 print("launch_browser.dart browser url");
19 print("Supported browsers: ${Browser.SUPPORTED_BROWSERS}"); 19 print("Supported browsers: ${Browser.SUPPORTED_BROWSERS}");
20 } 20 }
21 21
22 void main(List<String> arguments) { 22 void main(List<String> arguments) {
23 if (arguments.length != 2) { 23 if (arguments.length != 2) {
24 print("Wrong number of arguments, please pass in exactly two arguments"); 24 print("Wrong number of arguments, please pass in exactly two arguments");
25 printHelp(); 25 printHelp();
26 return; 26 return;
27 } 27 }
28 var name = arguments[0]; 28 var name = arguments[0];
29 29
30 if (!Browser.supportedBrowser(name)) { 30 if (!Browser.supportedBrowser(name)) {
31 print("Specified browser not supported"); 31 print("Specified browser not supported");
32 printHelp(); 32 printHelp();
33 return; 33 return;
34 } 34 }
35 35
36 var executable = Locations.getBrowserLocation(name, {}); 36 var runtime = Runtime.find(name);
37 var browser = new Browser.byName(name, executable); 37 var configuration = new Configuration(runtime: runtime);
38 var executable = configuration.browserLocation;
39 var browser = new Browser.byRuntime(runtime, executable);
38 browser.start(arguments[1]); 40 browser.start(arguments[1]);
39 } 41 }
OLDNEW
« no previous file with comments | « tools/testing/dart/http_server.dart ('k') | tools/testing/dart/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698