Chromium Code Reviews| Index: sdk/lib/_internal/pub/test/transformer/dart2js/includes_source_map_urls_test.dart |
| diff --git a/sdk/lib/_internal/pub/test/transformer/dart2js/includes_source_map_urls_test.dart b/sdk/lib/_internal/pub/test/transformer/dart2js/includes_source_map_urls_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ee5587a21376abe18c856ba39d121f8588193d2f |
| --- /dev/null |
| +++ b/sdk/lib/_internal/pub/test/transformer/dart2js/includes_source_map_urls_test.dart |
| @@ -0,0 +1,38 @@ |
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.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. |
| + |
| +library pub_tests; |
| + |
| +import 'package:scheduled_test/scheduled_test.dart'; |
| + |
| +import '../../descriptor.dart' as d; |
| +import '../../test_pub.dart'; |
| + |
| +main() { |
| + initConfig(); |
| + integration("includes proper URLs in generated JS and source map", () { |
| + d.dir(appPath, [ |
| + d.appPubspec(), |
| + d.dir("web", [ |
| + d.file("main.dart", "void main() => print('hello');") |
| + ]) |
| + ]).create(); |
| + |
| + schedulePub(args: ["build"], |
| + output: new RegExp(r'Built 3 files to "build".'), |
| + exitCode: 0); |
| + |
| + d.dir(appPath, [ |
| + d.dir('build', [ |
| + d.dir('web', [ |
| + d.matcherFile('main.dart.js', allOf([ |
| + contains("# sourceMappingURL=main.dart.js.map"), |
| + contains("@ sourceMappingURL=main.dart.js.map") |
|
floitsch
2014/03/11 12:51:01
Don't look for this line.
There is an open bug (is
Bob Nystrom
2014/04/03 21:36:07
Thanks, I'll take this out in a separate patch.
|
| + ])), |
| + d.matcherFile('main.dart.js.map', contains('"file": "main.dart.js"')) |
| + ]) |
| + ]) |
| + ]).validate(); |
| + }); |
| +} |