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

Side by Side Diff: tests/compiler/dart2js/source_map_pub_build_validity_test.dart

Issue 228003005: Remove redundancy in source map entries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed command path. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:path/path.dart' as path; 7 import 'package:path/path.dart' as path;
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 9
10 import 'source_map_consistency_helper.dart'; 10 import 'source_map_validator_helper.dart';
11 11
12 void main() { 12 void main() {
13 asyncTest(() => createTempDir().then((Directory tmpDir) { 13 asyncTest(() => createTempDir().then((Directory tmpDir) {
14 Directory sunflowerDir = new Directory.fromUri( 14 Directory sunflowerDir = new Directory.fromUri(
15 Platform.script.resolve('../../../samples/sunflower')); 15 Platform.script.resolve('../../../samples/sunflower'));
16 16
17 print("Copying '${sunflowerDir.path}' to '${tmpDir.path}'."); 17 print("Copying '${sunflowerDir.path}' to '${tmpDir.path}'.");
18 copyDirectory(sunflowerDir, tmpDir); 18 copyDirectory(sunflowerDir, tmpDir);
19 String ext = Platform.isWindows ? '.bat' : ''; 19 String ext = Platform.isWindows ? '.bat' : '';
20 String command = path.normalize(path.join(path.fromUri(Platform.script), 20 String command = path.normalize(path.join(path.fromUri(Platform.script),
21 '../../../../sdk/bin/pub${ext}')); 21 '../../../../sdk/bin/pub${ext}'));
22 String file = path.join(tmpDir.path, 'build/web/sunflower.dart.js'); 22 String file = path.join(tmpDir.path, 'build/web/sunflower.dart.js');
23 print("Running '$command build --mode=debug' from '${tmpDir}'."); 23 print("Running '$command build --mode=debug' from '${tmpDir}'.");
24 return Process.run(command, ['build','--mode=debug'], 24 return Process.run(command, ['build','--mode=debug'],
25 workingDirectory: tmpDir.path).then((process) { 25 workingDirectory: tmpDir.path).then((process) {
26 print(process.stdout); 26 print(process.stdout);
27 checkConsistency(new Uri.file(file, windows: Platform.isWindows)); 27 validateSourceMap(new Uri.file(file, windows: Platform.isWindows));
28 print("Deleting '${tmpDir.path}'."); 28 print("Deleting '${tmpDir.path}'.");
29 tmpDir.deleteSync(recursive: true); 29 tmpDir.deleteSync(recursive: true);
30 }); 30 });
31 })); 31 }));
32 } 32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698