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

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

Issue 1101773002: Add Windows support. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Unused import 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 unified diff | Download patch
« no previous file with comments | « test/runner/browser/dartium_test.dart ('k') | test/runner/browser/phantom_js_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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 .then((server) { 143 .then((server) {
144 var firefox = new Firefox(baseUrlForAddress(server.address, server.port)); 144 var firefox = new Firefox(baseUrlForAddress(server.address, server.port));
145 return firefox.close().whenComplete(server.close); 145 return firefox.close().whenComplete(server.close);
146 }); 146 });
147 }); 147 });
148 148
149 test("reports an error in onExit", () { 149 test("reports an error in onExit", () {
150 var firefox = new Firefox("http://dart-lang.org", 150 var firefox = new Firefox("http://dart-lang.org",
151 executable: "_does_not_exist"); 151 executable: "_does_not_exist");
152 expect(firefox.onExit, throwsA(isApplicationException(startsWith( 152 expect(firefox.onExit, throwsA(isApplicationException(startsWith(
153 "Failed to start Firefox: No such file or directory")))); 153 "Failed to start Firefox: $noSuchFileMessage"))));
154 }); 154 });
155 155
156 group("can run successful tests", () { 156 group("can run successful tests", () {
157 setUp(() { 157 setUp(() {
158 new File(p.join(_sandbox, "test.dart")).writeAsStringSync(""" 158 new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
159 import 'package:test/test.dart'; 159 import 'package:test/test.dart';
160 160
161 void main() { 161 void main() {
162 test("success", () {}); 162 test("success", () {});
163 } 163 }
(...skipping 21 matching lines...) Expand all
185 } 185 }
186 """); 186 """);
187 187
188 var result = _runTest(["-p", "firefox", "test.dart"]); 188 var result = _runTest(["-p", "firefox", "test.dart"]);
189 expect(result.exitCode, equals(1)); 189 expect(result.exitCode, equals(1));
190 }); 190 });
191 } 191 }
192 192
193 ProcessResult _runTest(List<String> args) => 193 ProcessResult _runTest(List<String> args) =>
194 runTest(args, workingDirectory: _sandbox); 194 runTest(args, workingDirectory: _sandbox);
OLDNEW
« no previous file with comments | « test/runner/browser/dartium_test.dart ('k') | test/runner/browser/phantom_js_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698