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

Side by Side Diff: test/runner/browser/phantom_js_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/firefox_test.dart ('k') | test/runner/browser/safari_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 var phantomJS = new PhantomJS( 147 var phantomJS = new PhantomJS(
148 baseUrlForAddress(server.address, server.port)); 148 baseUrlForAddress(server.address, server.port));
149 return phantomJS.close().whenComplete(server.close); 149 return phantomJS.close().whenComplete(server.close);
150 }); 150 });
151 }); 151 });
152 152
153 test("reports an error in onExit", () { 153 test("reports an error in onExit", () {
154 var phantomJS = new PhantomJS("http://dart-lang.org", 154 var phantomJS = new PhantomJS("http://dart-lang.org",
155 executable: "_does_not_exist"); 155 executable: "_does_not_exist");
156 expect(phantomJS.onExit, throwsA(isApplicationException(startsWith( 156 expect(phantomJS.onExit, throwsA(isApplicationException(startsWith(
157 "Failed to start PhantomJS: No such file or directory")))); 157 "Failed to start PhantomJS: $noSuchFileMessage"))));
158 }); 158 });
159 159
160 test("can run successful tests", () { 160 test("can run successful tests", () {
161 new File(p.join(_sandbox, "test.dart")).writeAsStringSync(""" 161 new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
162 import 'package:test/test.dart'; 162 import 'package:test/test.dart';
163 163
164 void main() { 164 void main() {
165 test("success", () {}); 165 test("success", () {});
166 } 166 }
167 """); 167 """);
(...skipping 11 matching lines...) Expand all
179 } 179 }
180 """); 180 """);
181 181
182 var result = _runTest(["-p", "phantomjs", "test.dart"]); 182 var result = _runTest(["-p", "phantomjs", "test.dart"]);
183 expect(result.exitCode, equals(1)); 183 expect(result.exitCode, equals(1));
184 }); 184 });
185 } 185 }
186 186
187 ProcessResult _runTest(List<String> args) => 187 ProcessResult _runTest(List<String> args) =>
188 runTest(args, workingDirectory: _sandbox); 188 runTest(args, workingDirectory: _sandbox);
OLDNEW
« no previous file with comments | « test/runner/browser/firefox_test.dart ('k') | test/runner/browser/safari_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698