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

Unified Diff: test/runner/browser/compact_reporter_test.dart

Issue 1243293002: Convert a bunch of tests to use scheduled_test's infrastructure. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes 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 | « test/runner/browser/code_server.dart ('k') | test/runner/browser/content_shell_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/browser/compact_reporter_test.dart
diff --git a/test/runner/browser/compact_reporter_test.dart b/test/runner/browser/compact_reporter_test.dart
index 529f308d1e53d0cc346951f9081b83739327dfc9..30d402bee78be81b228c1d93a77a029d44a556bf 100644
--- a/test/runner/browser/compact_reporter_test.dart
+++ b/test/runner/browser/compact_reporter_test.dart
@@ -4,27 +4,16 @@
@TestOn("vm")
-import 'dart:io';
-
-import 'package:path/path.dart' as p;
-import 'package:test/src/util/io.dart';
-import 'package:test/test.dart';
+import 'package:scheduled_test/descriptor.dart' as d;
+import 'package:scheduled_test/scheduled_test.dart';
import '../../io.dart';
-String _sandbox;
-
void main() {
- setUp(() {
- _sandbox = createTempDir();
- });
-
- tearDown(() {
- new Directory(_sandbox).deleteSync(recursive: true);
- });
+ useSandbox();
test("prints the platform name when running on multiple platforms", () {
- new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
+ d.file("test.dart", """
import 'dart:async';
import 'package:path/path.dart' as p;
@@ -33,24 +22,18 @@ import 'package:test/test.dart';
void main() {
test("success", () {});
}
-""");
-
- var result = _runTest([
- "-r",
- "compact",
- "-p",
- "content-shell",
- "-p",
- "vm",
- "-j",
- "1",
+""").create();
+
+ var test = runTest([
+ "-r", "compact",
+ "-p", "content-shell",
+ "-p", "vm",
+ "-j", "1",
"test.dart"
- ]);
- expect(result.stdout, contains("[VM]"));
- expect(result.stdout, contains("[Dartium Content Shell]"));
- expect(result.exitCode, equals(0));
+ ], compact: true);
+
+ test.stdout.expect(containsInOrder(["[VM]", "[Dartium Content Shell]"]));
+
+ test.shouldExit(0);
});
}
-
-ProcessResult _runTest(List<String> args) =>
- runTest(args, workingDirectory: _sandbox);
« no previous file with comments | « test/runner/browser/code_server.dart ('k') | test/runner/browser/content_shell_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698