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

Side by Side Diff: test/runner/browser/compact_reporter_test.dart

Issue 983573002: Add support for running browser tests to the test runner. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Created 5 years, 9 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:io';
6
7 import 'package:path/path.dart' as p;
8 import 'package:unittest/unittest.dart';
9
10 import '../../io.dart';
11
12 String _sandbox;
13
14 void main() {
15 setUp(() {
16 _sandbox = Directory.systemTemp.createTempSync('unittest_').path;
17 });
18
19 tearDown(() {
20 new Directory(_sandbox).deleteSync(recursive: true);
21 });
22
23 test("prints the platform name when running on multiple platforms", () {
24 new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
25 import 'dart:async';
26
27 import 'package:path/path.dart' as p;
28 import 'package:unittest/unittest.dart';
29
30 void main() {
31 test("success", () {});
32 }
33 """);
34
35 var result = _runUnittest(["-p", "chrome", "-p", "vm", "test.dart"]);
36 expect(result.stdout, contains("[VM]"));
37 expect(result.stdout, contains("[Chrome]"));
38 expect(result.exitCode, equals(0));
39 });
40 }
41
42 ProcessResult _runUnittest(List<String> args) =>
43 runUnittest(args, workingDirectory: _sandbox);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698