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

Side by Side Diff: test/runner/precompiled_paths_test.dart

Issue 2184543002: Use the package_resolver package. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 4 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/loader_test.dart ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 @Tags(const ["chrome"]) 6 @Tags(const ["chrome"])
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:package_resolver/package_resolver.dart';
10 import 'package:path/path.dart' as p; 11 import 'package:path/path.dart' as p;
11 import 'package:scheduled_test/descriptor.dart' as d; 12 import 'package:scheduled_test/descriptor.dart' as d;
12 import 'package:scheduled_test/scheduled_process.dart'; 13 import 'package:scheduled_test/scheduled_process.dart';
13 import 'package:scheduled_test/scheduled_stream.dart'; 14 import 'package:scheduled_test/scheduled_stream.dart';
14 import 'package:scheduled_test/scheduled_test.dart'; 15 import 'package:scheduled_test/scheduled_test.dart';
15 16
16 import 'package:test/src/util/io.dart'; 17 import 'package:test/src/util/io.dart';
17 18
18 import '../io.dart'; 19 import '../io.dart';
19 20
(...skipping 12 matching lines...) Expand all
32 var channel = serializeSuite(() { 33 var channel = serializeSuite(() {
33 return () => test("success", () {}); 34 return () => test("success", () {});
34 }, hidePrints: false); 35 }, hidePrints: false);
35 postMessageChannel().pipe(channel); 36 postMessageChannel().pipe(channel);
36 } 37 }
37 """).create(); 38 """).create();
38 39
39 d.dir("precompiled", []).create(); 40 d.dir("precompiled", []).create();
40 41
41 var dart2js = new ScheduledProcess.start(p.join(sdkDir, 'bin', 'dart2js'), [ 42 var dart2js = new ScheduledProcess.start(p.join(sdkDir, 'bin', 'dart2js'), [
42 "--package-root=${p.join(p.current, 'packages')}", 43 PackageResolver.current.processArgument,
43 "to_precompile.dart", 44 "to_precompile.dart",
44 "--out=precompiled/test.dart.browser_test.dart.js" 45 "--out=precompiled/test.dart.browser_test.dart.js"
45 ], workingDirectory: sandbox); 46 ], workingDirectory: sandbox);
46 dart2js.shouldExit(0); 47 dart2js.shouldExit(0);
47 48
48 d.file("test.dart", "invalid dart}").create(); 49 d.file("test.dart", "invalid dart}").create();
49 50
50 var test = runTest( 51 var test = runTest(
51 ["-p", "chrome", "--precompiled=precompiled/", "test.dart"]); 52 ["-p", "chrome", "--precompiled=precompiled/", "test.dart"]);
52 test.stdout.expect(containsInOrder([ 53 test.stdout.expect(containsInOrder([
53 "+0: success", 54 "+0: success",
54 "+1: All tests passed!" 55 "+1: All tests passed!"
55 ])); 56 ]));
56 test.shouldExit(0); 57 test.shouldExit(0);
57 }); 58 });
58 } 59 }
OLDNEW
« no previous file with comments | « test/runner/loader_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698