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

Side by Side Diff: test/runner/configuration/top_level_test.dart

Issue 2515303002: Add expectAsyncX and expectAsyncUntilX methods, and deprecate the old methods. (Closed)
Patch Set: Mark parameter types as Object. Created 4 years 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/frontend/tear_down_all_test.dart ('k') | test/runner/engine_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 "", 56 "",
57 startsWith("Observatory URL: "), 57 startsWith("Observatory URL: "),
58 startsWith("Remote debugger URL: "), 58 startsWith("Remote debugger URL: "),
59 "The test runner is paused. Open the remote debugger or the Observatory " 59 "The test runner is paused. Open the remote debugger or the Observatory "
60 "and set breakpoints. Once", 60 "and set breakpoints. Once",
61 "you're finished, return to this terminal and press Enter." 61 "you're finished, return to this terminal and press Enter."
62 ])); 62 ]));
63 63
64 schedule(() async { 64 schedule(() async {
65 var nextLineFired = false; 65 var nextLineFired = false;
66 test.stdout.next().then(expectAsync((line) { 66 test.stdout.next().then(expectAsync1((line) {
67 expect(line, contains("+0: success")); 67 expect(line, contains("+0: success"));
68 nextLineFired = true; 68 nextLineFired = true;
69 })); 69 }));
70 70
71 // Wait a little bit to be sure that the tests don't start running without 71 // Wait a little bit to be sure that the tests don't start running without
72 // our input. 72 // our input.
73 await new Future.delayed(new Duration(seconds: 2)); 73 await new Future.delayed(new Duration(seconds: 2));
74 expect(nextLineFired, isFalse); 74 expect(nextLineFired, isFalse);
75 }); 75 });
76 76
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 test("failure", () => throw "oh no"); 554 test("failure", () => throw "oh no");
555 } 555 }
556 """) 556 """)
557 ]).create(); 557 ]).create();
558 558
559 var test = runTest([]); 559 var test = runTest([]);
560 test.stdout.expect(consumeThrough(contains('All tests passed!'))); 560 test.stdout.expect(consumeThrough(contains('All tests passed!')));
561 test.shouldExit(0); 561 test.shouldExit(0);
562 }); 562 });
563 } 563 }
OLDNEW
« no previous file with comments | « test/frontend/tear_down_all_test.dart ('k') | test/runner/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698