Index: tests/isolate/scenarios/package_data_uri_spec/package_resolve_test.dart |
diff --git a/tests/isolate/scenarios/automatic_resolution_spec/package_resolve_test.dart b/tests/isolate/scenarios/package_data_uri_spec/package_resolve_test.dart |
similarity index 86% |
copy from tests/isolate/scenarios/automatic_resolution_spec/package_resolve_test.dart |
copy to tests/isolate/scenarios/package_data_uri_spec/package_resolve_test.dart |
index 67b4d1e3f000ac1029029a446a437f9a5b553dad..8884d4eb30f6fd8b87264223848933afeb047af4 100644 |
--- a/tests/isolate/scenarios/automatic_resolution_spec/package_resolve_test.dart |
+++ b/tests/isolate/scenarios/package_data_uri_spec/package_resolve_test.dart |
@@ -8,26 +8,32 @@ import 'dart:isolate'; |
final PACKAGE_URI = "package:foo/bar.dart"; |
final PACKAGE_PATH = "file:///no/such/directory/bar.dart"; |
+final PACKAGE_SPEC = """ |
+# This is the content of a .packages file. |
+foo:file:///no/such/directory/ |
+"""; |
+ |
+ |
main([args, port]) async { |
if (port != null) { |
testPackageResolution(port); |
return; |
} |
+ var data = new Uri.dataFromString(PACKAGE_SPEC); |
var p = new RawReceivePort(); |
Isolate.spawnUri(Platform.script, |
[], |
p.sendPort, |
- automaticPackageResolution: true); |
+ packageConfig: data); |
p.handler = (msg) { |
p.close(); |
if (msg is! List) { |
print(msg.runtimeType); |
throw "Failure return from spawned isolate:\n\n$msg"; |
} |
- var child_pkg_config = Platform.script.resolve(".packages"); |
- if (msg[0] != child_pkg_config.toString()) { |
+ if (msg[0] != data.toString()) { |
throw "Bad package config in child isolate: ${msg[0]}\n" |
- "Expected: $child_pkg_config"; |
+ "Expected: $data"; |
} |
if (msg[1] != PACKAGE_PATH) { |
throw "Package path not matching: ${msg[1]}"; |