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

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

Issue 1175163003: Factor out some common logic from the launchers. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: fix test Created 5 years, 6 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
« no previous file with comments | « test/runner/browser/dartium_test.dart ('k') | test/runner/browser/internet_explorer_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 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 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:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 await firefox.close(); 147 await firefox.close();
148 } finally { 148 } finally {
149 server.close(); 149 server.close();
150 } 150 }
151 }); 151 });
152 152
153 test("reports an error in onExit", () { 153 test("reports an error in onExit", () {
154 var firefox = new Firefox("http://dart-lang.org", 154 var firefox = new Firefox("http://dart-lang.org",
155 executable: "_does_not_exist"); 155 executable: "_does_not_exist");
156 expect(firefox.onExit, throwsA(isApplicationException(startsWith( 156 expect(firefox.onExit, throwsA(isApplicationException(startsWith(
157 "Failed to start Firefox: $noSuchFileMessage")))); 157 "Failed to run Firefox: $noSuchFileMessage"))));
158 }); 158 });
159 159
160 group("can run successful tests", () { 160 group("can run successful tests", () {
161 setUp(() { 161 setUp(() {
162 new File(p.join(_sandbox, "test.dart")).writeAsStringSync(""" 162 new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
163 import 'package:test/test.dart'; 163 import 'package:test/test.dart';
164 164
165 void main() { 165 void main() {
166 test("success", () {}); 166 test("success", () {});
167 } 167 }
(...skipping 21 matching lines...) Expand all
189 } 189 }
190 """); 190 """);
191 191
192 var result = _runTest(["-p", "firefox", "test.dart"]); 192 var result = _runTest(["-p", "firefox", "test.dart"]);
193 expect(result.exitCode, equals(1)); 193 expect(result.exitCode, equals(1));
194 }); 194 });
195 } 195 }
196 196
197 ProcessResult _runTest(List<String> args) => 197 ProcessResult _runTest(List<String> args) =>
198 runTest(args, workingDirectory: _sandbox); 198 runTest(args, workingDirectory: _sandbox);
OLDNEW
« no previous file with comments | « test/runner/browser/dartium_test.dart ('k') | test/runner/browser/internet_explorer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698