Chromium Code Reviews

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: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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..74b3a470d6846fb6d236699532a27539a8e527cf 100644
--- a/test/runner/browser/runner_test.dart
+++ b/test/runner/browser/runner_test.dart
@@ -96,12 +96,18 @@ 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 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 +116,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 +130,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';
« lib/src/backend/test_platform.dart ('K') | « test/runner/browser/firefox_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine