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

Unified Diff: sdk/lib/_internal/pub/test/dart2js/omits_source_map_if_sourceMaps_false_test.dart

Issue 903563003: Add sourceMaps option to $dart2js transformer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor formatting Created 5 years, 10 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
Index: sdk/lib/_internal/pub/test/dart2js/omits_source_map_if_sourceMaps_false_test.dart
diff --git a/sdk/lib/_internal/pub/test/dart2js/includes_source_maps_in_debug_test.dart b/sdk/lib/_internal/pub/test/dart2js/omits_source_map_if_sourceMaps_false_test.dart
similarity index 67%
copy from sdk/lib/_internal/pub/test/dart2js/includes_source_maps_in_debug_test.dart
copy to sdk/lib/_internal/pub/test/dart2js/omits_source_map_if_sourceMaps_false_test.dart
index 69ff7a125d5422d8b56c13623fd3af07ba61fd98..aaecf9b993b4c605a1679f3be0665533cfd06485 100644
--- a/sdk/lib/_internal/pub/test/dart2js/includes_source_maps_in_debug_test.dart
+++ b/sdk/lib/_internal/pub/test/dart2js/omits_source_map_if_sourceMaps_false_test.dart
@@ -2,16 +2,21 @@
// 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 'package:scheduled_test/scheduled_test.dart';
-
import '../descriptor.dart' as d;
import '../test_pub.dart';
main() {
initConfig();
- integration("includes source map URLs in a debug build", () {
+ integration("omits source maps from a debug build if sourceMaps false", () {
d.dir(appPath, [
- d.appPubspec(),
+ d.pubspec({
+ 'name': 'myapp',
+ 'transformers': [{
+ '\$dart2js': {
+ 'sourceMaps': false
+ }
+ }]
+ }),
d.dir("web", [
d.file("main.dart", "void main() => print('hello');")
])
@@ -24,9 +29,7 @@ main() {
d.dir(appPath, [
d.dir('build', [
d.dir('web', [
- d.matcherFile('main.dart.js',
- contains("# sourceMappingURL=main.dart.js.map")),
- d.matcherFile('main.dart.js.map', contains('"file": "main.dart.js"'))
+ d.nothing('main.dart.js.map')
])
])
]).validate();

Powered by Google App Engine
This is Rietveld 408576698