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

Side by Side Diff: test/runner/browser/dartium_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/content_shell_test.dart ('k') | test/runner/browser/firefox_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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 await dartium.close(); 149 await dartium.close();
150 } finally { 150 } finally {
151 server.close(); 151 server.close();
152 } 152 }
153 }); 153 });
154 154
155 test("reports an error in onExit", () { 155 test("reports an error in onExit", () {
156 var dartium = new Dartium("http://dart-lang.org", 156 var dartium = new Dartium("http://dart-lang.org",
157 executable: "_does_not_exist"); 157 executable: "_does_not_exist");
158 expect(dartium.onExit, throwsA(isApplicationException(startsWith( 158 expect(dartium.onExit, throwsA(isApplicationException(startsWith(
159 "Failed to start Dartium: $noSuchFileMessage")))); 159 "Failed to run Dartium: $noSuchFileMessage"))));
160 }); 160 });
161 161
162 test("can run successful tests", () { 162 test("can run successful tests", () {
163 new File(p.join(_sandbox, "test.dart")).writeAsStringSync(""" 163 new File(p.join(_sandbox, "test.dart")).writeAsStringSync("""
164 import 'package:test/test.dart'; 164 import 'package:test/test.dart';
165 165
166 void main() { 166 void main() {
167 test("success", () {}); 167 test("success", () {});
168 } 168 }
169 """); 169 """);
(...skipping 12 matching lines...) Expand all
182 } 182 }
183 """); 183 """);
184 184
185 var result = _runTest(["-p", "dartium", "test.dart"]); 185 var result = _runTest(["-p", "dartium", "test.dart"]);
186 expect(result.exitCode, equals(1)); 186 expect(result.exitCode, equals(1));
187 }); 187 });
188 } 188 }
189 189
190 ProcessResult _runTest(List<String> args) => 190 ProcessResult _runTest(List<String> args) =>
191 runTest(args, workingDirectory: _sandbox); 191 runTest(args, workingDirectory: _sandbox);
OLDNEW
« no previous file with comments | « test/runner/browser/content_shell_test.dart ('k') | test/runner/browser/firefox_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698