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

Unified Diff: sdk/lib/_internal/pub/test/build/copies_browser_js_with_dev_dependency_test.dart

Issue 157743005: Find “browser” dependency even if it’s dev or override. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/build/copies_browser_js_with_dev_dependency_test.dart
diff --git a/sdk/lib/_internal/pub/test/build/ignores_existing_compiled_js_files_test.dart b/sdk/lib/_internal/pub/test/build/copies_browser_js_with_dev_dependency_test.dart
similarity index 51%
copy from sdk/lib/_internal/pub/test/build/ignores_existing_compiled_js_files_test.dart
copy to sdk/lib/_internal/pub/test/build/copies_browser_js_with_dev_dependency_test.dart
index 962e85860a462dcd8d7aee8246d1cda65637304e..a0469f8da49b376865be5e3f61ef740c5d0f3764 100644
--- a/sdk/lib/_internal/pub/test/build/ignores_existing_compiled_js_files_test.dart
+++ b/sdk/lib/_internal/pub/test/build/copies_browser_js_with_dev_dependency_test.dart
@@ -6,37 +6,44 @@ import 'package:scheduled_test/scheduled_test.dart';
import '../descriptor.dart' as d;
import '../test_pub.dart';
+import 'utils.dart';
main() {
+ // This is a regression test for http://dartbug.com/16617.
+
initConfig();
- integration("ignores existing JS files that were compiled to Dart", () {
+ integration("compiles dart.js and interop.js next to entrypoints", () {
nweiz 2014/02/10 21:42:00 Update the test name to match the file name.
Bob Nystrom 2014/02/10 22:08:19 Done.
// Dart2js can take a long time to compile dart code, so we increase the
// timeout to cope with that.
currentSchedule.timeout *= 3;
+ serveBrowserPackage();
+
d.dir(appPath, [
- d.appPubspec(),
+ d.pubspec({
+ "name": "myapp",
+ "dev_dependencies": {
+ "browser": "any"
+ }
+ }),
d.dir('web', [
- d.file('file.dart', 'void main() => print("hello");'),
- d.file('file.dart.js', 'some js code'),
- d.dir('subdir', [
- d.file('subfile.dart', 'void main() => print("ping");'),
- d.file('subfile.dart.js', 'some js code')
- ])
+ d.file('file.dart', 'void main() => print("hello");')
])
]).create();
- schedulePub(args: ["build"],
- output: new RegExp(r"Built 6 files!"));
+ pubGet();
+
+ schedulePub(args: ["build", "--all"],
+ output: new RegExp(r"Built 5 files!"));
d.dir(appPath, [
d.dir('build', [
d.dir('web', [
- d.matcherFile('file.dart.js', isNot(equals('some js code'))),
- d.dir('subdir', [
- d.matcherFile('subfile.dart.js', isNot(equals('some js code')))
- ])
+ d.dir('packages', [d.dir('browser', [
+ d.file('dart.js', 'contents of dart.js'),
+ d.file('interop.js', 'contents of interop.js')
+ ])])
])
])
]).validate();

Powered by Google App Engine
This is Rietveld 408576698