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

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

Issue 1070313002: Add firefox support. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Don't double-compile test suites Created 5 years, 8 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/firefox_test.dart ('k') | test/runner/runner_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/browser/runner_test.dart
diff --git a/test/runner/browser/runner_test.dart b/test/runner/browser/runner_test.dart
index aea05886d3756e828653b590adb81018a3dcd6fa..6b396be79ef567140f47be9a3a1a30914a07337e 100644
--- a/test/runner/browser/runner_test.dart
+++ b/test/runner/browser/runner_test.dart
@@ -96,12 +96,25 @@ void main() {
});
group("runs successful tests", () {
- test("on the browser only", () {
+ test("on Chrome", () {
new File(p.join(_sandbox, "test.dart")).writeAsStringSync(_success);
var result = _runUnittest(["-p", "chrome", "test.dart"]);
expect(result.exitCode, equals(0));
});
+ test("on Firefox", () {
+ new File(p.join(_sandbox, "test.dart")).writeAsStringSync(_success);
+ var result = _runUnittest(["-p", "firefox", "test.dart"]);
+ expect(result.exitCode, equals(0));
+ });
+
+ test("on multiple browsers", () {
+ new File(p.join(_sandbox, "test.dart")).writeAsStringSync(_success);
+ var result = _runUnittest(["-p", "firefox", "-p", "chrome", "test.dart"]);
+ expect("Compiling".allMatches(result.stdout), hasLength(1));
+ expect(result.exitCode, equals(0));
+ });
+
test("on the browser and the VM", () {
new File(p.join(_sandbox, "test.dart")).writeAsStringSync(_success);
var result = _runUnittest(["-p", "chrome", "-p", "vm", "test.dart"]);
@@ -110,7 +123,7 @@ void main() {
});
group("runs failing tests", () {
- test("on the browser only", () {
+ test("on Chrome", () {
new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
import 'dart:async';
@@ -124,6 +137,20 @@ void main() {
expect(result.exitCode, equals(1));
});
+ test("on Firefox", () {
+ new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
+import 'dart:async';
+
+import 'package:test/test.dart';
+
+void main() {
+ test("failure", () => throw new TestFailure("oh no"));
+}
+""");
+ var result = _runUnittest(["-p", "firefox", "test.dart"]);
+ expect(result.exitCode, equals(1));
+ });
+
test("that fail only on the browser", () {
new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
import 'dart:async';
« no previous file with comments | « test/runner/browser/firefox_test.dart ('k') | test/runner/runner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698