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

Unified Diff: tests/compiler/dart2js/source_map_pub_build_consistency_test.dart

Issue 219263003: Add end-to-end test for consistency in source map file and js file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comment. Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/source_map_d2js_consistency_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/source_map_pub_build_consistency_test.dart
diff --git a/tests/compiler/dart2js/source_map_pub_build_consistency_test.dart b/tests/compiler/dart2js/source_map_pub_build_consistency_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..f8dceb59721dc91b9080c29d70f1690e88f55e92
--- /dev/null
+++ b/tests/compiler/dart2js/source_map_pub_build_consistency_test.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:path/path.dart' as path;
+import 'package:async_helper/async_helper.dart';
+
+import 'source_map_consistency_helper.dart';
+
+void main() {
+ asyncTest(() => createTempDir().then((Directory tmpDir) {
+ Directory sunflowerDir = new Directory.fromUri(
+ Platform.script.resolve('../../../samples/sunflower'));
+
+ print("Copying '${sunflowerDir.path}' to '${tmpDir.path}'.");
+ copyDirectory(sunflowerDir, tmpDir);
+ String ext = Platform.isWindows ? '.bat' : '';
+ String command = path.normalize(path.join(path.fromUri(Platform.script),
+ '../../../../sdk/bin/pub${ext}'));
+ String file = path.join(tmpDir.path, 'build/web/sunflower.dart.js');
+ print("Running '$command build --mode=debug' from '${tmpDir}'.");
+ return Process.run(command, ['build','--mode=debug'],
+ workingDirectory: tmpDir.path).then((process) {
+ print(process.stdout);
+ checkConsistency(new Uri.file(file, windows: Platform.isWindows));
+ print("Deleting '${tmpDir.path}'.");
+ tmpDir.deleteSync(recursive: true);
+ });
+ }));
+}
« no previous file with comments | « tests/compiler/dart2js/source_map_d2js_consistency_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698