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

Unified Diff: test/runner/pause_after_load_test.dart

Issue 1263593005: Disable timeouts when debugging. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/runner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/pause_after_load_test.dart
diff --git a/test/runner/pause_after_load_test.dart b/test/runner/pause_after_load_test.dart
index 99409ac461730049eb65b6e0556c23f83b0f6b65..7b4f184da03065a52ae96194c90b5d95c4fd08e9 100644
--- a/test/runner/pause_after_load_test.dart
+++ b/test/runner/pause_after_load_test.dart
@@ -235,6 +235,44 @@ void main() {
test.stderr.expect(isDone);
}, testOn: "!windows");
+ test("disables timeouts", () {
+ d.file("test.dart", """
+import 'package:test/test.dart';
+
+void main() {
+ print('loaded test 1!');
+
+ test("success", () {}, timeout: new Timeout(Duration.ZERO));
+}
+""").create();
+
+ var test = runTest(
kevmoo 2015/07/28 22:43:56 perhaps pick a different name as to not overload '
nweiz 2015/07/29 00:33:01 This is consistent with other tests. It's also the
+ ["--pause-after-load", "-p", "dartium", "-n", "success", "test.dart"]);
+ test.stdout.expect(consumeThrough("loaded test 1!"));
+ test.stdout.expect(consumeThrough(inOrder([
+ "The test runner is paused. Open the dev console in Dartium and set "
+ "breakpoints. Once you're",
+ "finished, return to this terminal and press Enter."
+ ])));
+
+ schedule(() async {
+ var nextLineFired = false;
+ test.stdout.next().then(expectAsync((line) {
+ expect(line, contains("+0: success"));
+ nextLineFired = true;
+ }));
+
+ // Wait a little bit to be sure that the tests don't start running without
+ // our input.
+ await new Future.delayed(new Duration(seconds: 2));
+ expect(nextLineFired, isFalse);
+ });
+
+ test.writeLine('');
+ test.stdout.expect(consumeThrough(contains("+1: All tests passed!")));
+ test.shouldExit(0);
+ });
+
// Regression test for #304.
test("supports test name patterns", () {
d.file("test.dart", """
« no previous file with comments | « lib/src/runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698