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

Side by Side Diff: test/runner/signal_test.dart

Issue 1077153006: Fix test/runner/signal_test. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | 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 @TestOn("vm") 5 @TestOn("vm")
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return new Future(() { 141 return new Future(() {
142 // Loop forever so that if the test isn't stopped while running, it never 142 // Loop forever so that if the test isn't stopped while running, it never
143 // stops. 143 // stops.
144 while (true) {} 144 while (true) {}
145 }); 145 });
146 }); 146 });
147 } 147 }
148 """); 148 """);
149 149
150 return _startTest(["-p", "content-shell", "test.dart"]).then((process) { 150 return _startTest(["-p", "content-shell", "test.dart"]).then((process) {
151 return _lines.bind(process.stdout).skip(3).first.then((line) { 151 return _lines.bind(process.stdout).skip(2).first.then((line) {
kevmoo 2015/04/23 00:07:53 understanding why it's 2 and not three would be ni
nweiz 2015/04/23 00:12:06 Done.
152 expect(line, equals("running test")); 152 expect(line, equals("running test"));
153 process.kill(); 153 process.kill();
154 return process.exitCode; 154 return process.exitCode;
155 }).then((_) { 155 }).then((_) {
156 expect(new Directory(_tempDir).listSync(), isEmpty); 156 expect(new Directory(_tempDir).listSync(), isEmpty);
157 }); 157 });
158 }); 158 });
159 }); 159 });
160 160
161 test("kills a VM test immediately if ^C is sent twice", () { 161 test("kills a VM test immediately if ^C is sent twice", () {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 }); 268 });
269 }); 269 });
270 }); 270 });
271 } 271 }
272 272
273 Future<Process> _startTest(List<String> args) { 273 Future<Process> _startTest(List<String> args) {
274 new Directory(_tempDir).create(); 274 new Directory(_tempDir).create();
275 return startTest(args, workingDirectory: _sandbox, 275 return startTest(args, workingDirectory: _sandbox,
276 environment: {"_UNITTEST_TEMP_DIR": _tempDir}); 276 environment: {"_UNITTEST_TEMP_DIR": _tempDir});
277 } 277 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698