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

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

Issue 2863253002: Tighten up a bunch of types in test.dart. (Closed)
Patch Set: Merge branch 'master' into types-for-test Created 3 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
« no previous file with comments | « tools/testing/dart/dependency_graph.dart ('k') | tools/testing/dart/http_server.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 // TODO(antonm): rename to something like test_runner_updater. 5 // TODO(antonm): rename to something like test_runner_updater.
6 6
7 library drt_updater; 7 library drt_updater;
8 8
9 import "dart:async"; 9 import "dart:async";
10 import "dart:io"; 10 import "dart:io";
11 11
12 import "test_suite.dart"; 12 import "test_suite.dart";
13 13
14 typedef void Action();
15
14 class _DartiumUpdater { 16 class _DartiumUpdater {
15 String name; 17 String name;
16 String script; 18 String script;
17 String option; 19 String option;
18 20
19 bool isActive = false; 21 bool isActive = false;
20 bool updated = false; 22 bool updated = false;
21 List onUpdated; 23 List<Action> onUpdated;
22 24
23 Future<ProcessResult> _updatingProcess; 25 Future<ProcessResult> _updatingProcess;
24 26
25 _DartiumUpdater(this.name, this.script, [this.option = null]); 27 _DartiumUpdater(this.name, this.script, [this.option = null]);
26 28
27 void update() { 29 void update() {
28 if (!isActive) { 30 if (!isActive) {
29 isActive = true; 31 isActive = true;
30 print('Updating $name.'); 32 print('Updating $name.');
31 onUpdated = [ 33 onUpdated = [
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Download the default Dartium from Google Storage. 83 // Download the default Dartium from Google Storage.
82 if (_dartiumUpdater == null) { 84 if (_dartiumUpdater == null) {
83 _dartiumUpdater = new _DartiumUpdater( 85 _dartiumUpdater = new _DartiumUpdater(
84 'Dartium Chrome', 'tools/get_archive.py', 'dartium'); 86 'Dartium Chrome', 'tools/get_archive.py', 'dartium');
85 } 87 }
86 return _dartiumUpdater; 88 return _dartiumUpdater;
87 } else { 89 } else {
88 return null; 90 return null;
89 } 91 }
90 } 92 }
OLDNEW
« no previous file with comments | « tools/testing/dart/dependency_graph.dart ('k') | tools/testing/dart/http_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698