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

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

Issue 1707173002: Add browser tags to all of our 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
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:convert'; 7 import 'dart:convert';
8 8
9 import 'package:path/path.dart' as p; 9 import 'package:path/path.dart' as p;
10 import 'package:scheduled_test/descriptor.dart' as d; 10 import 'package:scheduled_test/descriptor.dart' as d;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 test("failure", () => throw "oh no"); 63 test("failure", () => throw "oh no");
64 } 64 }
65 """).create(); 65 """).create();
66 66
67 var test = runTest(["-p", "chrome", "--verbose-trace", "test.dart"]); 67 var test = runTest(["-p", "chrome", "--verbose-trace", "test.dart"]);
68 test.stdout.fork().expect(never(endsWith(" main.<fn>"))); 68 test.stdout.fork().expect(never(endsWith(" main.<fn>")));
69 test.stdout.fork().expect(never(contains("package:test"))); 69 test.stdout.fork().expect(never(contains("package:test")));
70 test.stdout.fork().expect(never(contains("dart:async/zone.dart"))); 70 test.stdout.fork().expect(never(contains("dart:async/zone.dart")));
71 test.stdout.expect(consumeThrough(contains("-1: Some tests failed."))); 71 test.stdout.expect(consumeThrough(contains("-1: Some tests failed.")));
72 test.shouldExit(1); 72 test.shouldExit(1);
73 }); 73 }, tags: 'chrome');
74 74
75 test("uses the specified reporter", () { 75 test("uses the specified reporter", () {
76 d.file("dart_test.yaml", JSON.encode({ 76 d.file("dart_test.yaml", JSON.encode({
77 "reporter": "json" 77 "reporter": "json"
78 })).create(); 78 })).create();
79 79
80 d.file("test.dart", """ 80 d.file("test.dart", """
81 import 'package:test/test.dart'; 81 import 'package:test/test.dart';
82 82
83 void main() { 83 void main() {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 test("success", () {}); 203 test("success", () {});
204 } 204 }
205 """).create(); 205 """).create();
206 206
207 var test = runTest(["test.dart"]); 207 var test = runTest(["test.dart"]);
208 test.stdout.expect(containsInOrder([ 208 test.stdout.expect(containsInOrder([
209 "[VM] success", 209 "[VM] success",
210 "[Dartium Content Shell] success" 210 "[Dartium Content Shell] success"
211 ])); 211 ]));
212 test.shouldExit(0); 212 test.shouldExit(0);
213 }); 213 }, tags: "content-shell");
214 214
215 test("command line args take precedence", () { 215 test("command line args take precedence", () {
216 d.file("dart_test.yaml", JSON.encode({ 216 d.file("dart_test.yaml", JSON.encode({
217 "timeout": "0s" 217 "timeout": "0s"
218 })).create(); 218 })).create();
219 219
220 d.file("test.dart", """ 220 d.file("test.dart", """
221 import 'dart:async'; 221 import 'dart:async';
222 222
223 import 'package:test/test.dart'; 223 import 'package:test/test.dart';
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 test("failure", () => throw "oh no"); 301 test("failure", () => throw "oh no");
302 } 302 }
303 """) 303 """)
304 ]).create(); 304 ]).create();
305 305
306 var test = runTest([]); 306 var test = runTest([]);
307 test.stdout.expect(consumeThrough(contains('All tests passed!'))); 307 test.stdout.expect(consumeThrough(contains('All tests passed!')));
308 test.shouldExit(0); 308 test.shouldExit(0);
309 }); 309 });
310 } 310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698