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

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

Issue 10264005: Suppress get_drt/dartium download if an executable is provided via flag (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added comment Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/testing/dart/test_options.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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("drt_updater"); 5 #library("drt_updater");
6 6
7 #import("dart:io"); 7 #import("dart:io");
8 #import("dart:builtin"); 8 #import("dart:builtin");
9 9
10 class _DartiumUpdater { 10 class _DartiumUpdater {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 void _onUpdatedHandler(int exit_code) { 47 void _onUpdatedHandler(int exit_code) {
48 print('$name updated ($exit_code)'); 48 print('$name updated ($exit_code)');
49 for (var callback in onUpdated ) callback(); 49 for (var callback in onUpdated ) callback();
50 } 50 }
51 } 51 }
52 52
53 _DartiumUpdater _dumpRenderTreeUpdater; 53 _DartiumUpdater _dumpRenderTreeUpdater;
54 _DartiumUpdater _dartiumUpdater; 54 _DartiumUpdater _dartiumUpdater;
55 55
56 _DartiumUpdater runtimeUpdater(String runtime) { 56 _DartiumUpdater runtimeUpdater(Map configuration) {
57 if (runtime == 'drt') { 57 String runtime = configuration['runtime'];
58 if (runtime == 'drt' && configuration['drt'] == '') {
59 // Download the default DumpRenderTree from Google Storage.
58 if (_dumpRenderTreeUpdater === null) { 60 if (_dumpRenderTreeUpdater === null) {
59 _dumpRenderTreeUpdater = new _DartiumUpdater('DumpRenderTree', 61 _dumpRenderTreeUpdater = new _DartiumUpdater('DumpRenderTree',
60 'get_drt.py'); 62 'get_drt.py');
61 } 63 }
62 return _dumpRenderTreeUpdater; 64 return _dumpRenderTreeUpdater;
63 } else if (runtime == 'dartium') { 65 } else if (runtime == 'dartium' && configuration['dartium'] == '') {
66 // Download the default Dartium from Google Storage.
64 if (_dartiumUpdater === null) { 67 if (_dartiumUpdater === null) {
65 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', 'get_drt.py', 68 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', 'get_drt.py',
66 '--dartium'); 69 '--dartium');
67 } 70 }
68 return _dartiumUpdater; 71 return _dartiumUpdater;
69 } else { 72 } else {
70 return null; 73 return null;
71 } 74 }
72 } 75 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698