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

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

Issue 1657613003: Eagerly close browser tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 10 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 | « test/io.dart ('k') | 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 // Windows doesn't support sending signals. 5 // Windows doesn't support sending signals.
6 @TestOn("vm && !windows") 6 @TestOn("vm && !windows")
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 var test = _runTest(["test.dart"]); 245 var test = _runTest(["test.dart"]);
246 test.stdout.expect(consumeThrough("running test")); 246 test.stdout.expect(consumeThrough("running test"));
247 signalAndQuit(test); 247 signalAndQuit(test);
248 248
249 d.file("output", "true").validate(); 249 d.file("output", "true").validate();
250 expectTempDirEmpty(); 250 expectTempDirEmpty();
251 }); 251 });
252 }); 252 });
253 } 253 }
254 254
255 ScheduledProcess _runTest(List<String> args) => 255 ScheduledProcess _runTest(List<String> args, {bool forwardStdio: false}) =>
256 runTest(args, environment: {"_UNITTEST_TEMP_DIR": _tempDir}); 256 runTest(args,
257 environment: {"_UNITTEST_TEMP_DIR": _tempDir},
258 forwardStdio: forwardStdio);
257 259
258 void signalAndQuit(ScheduledProcess test) { 260 void signalAndQuit(ScheduledProcess test) {
259 test.signal(ProcessSignal.SIGTERM); 261 test.signal(ProcessSignal.SIGTERM);
260 test.shouldExit(); 262 test.shouldExit();
261 test.stderr.expect(isDone); 263 test.stderr.expect(isDone);
262 } 264 }
263 265
264 void expectTempDirEmpty() { 266 void expectTempDirEmpty() {
265 schedule(() => expect(new Directory(_tempDir).listSync(), isEmpty)); 267 schedule(() => expect(new Directory(_tempDir).listSync(), isEmpty));
266 } 268 }
OLDNEW
« no previous file with comments | « test/io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698