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

Unified Diff: runtime/bin/builtin.dart

Issue 16092007: HTTP loading tests and package root support (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « no previous file | runtime/bin/dartutils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.dart
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index 66f61987080b3eea9535b461d13e67f9ad025c18..716ec71c3a0cff95b97e457f1104fe1d9057ca08 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -73,6 +73,12 @@ _setPackageRoot(String packageRoot) {
}
String _resolveScriptUri(String cwd, String scriptName, bool isWindows) {
+ var scriptUri = Uri.parse(scriptName);
+ if (scriptUri.scheme == 'http') {
+ _entrypoint = scriptUri;
+ _logResolution("# Resolved script to: $_entrypoint");
+ return _entrypoint.toString();
+ }
_logResolution("# Current working directory: $cwd");
_logResolution("# ScriptName: $scriptName");
if (isWindows) {
@@ -196,7 +202,11 @@ String _filePathFromPackageUri(Uri uri) {
if (_packageRoot != null) {
path = "${_packageRoot}${uri.path}";
} else {
- path = _entrypoint.resolve('packages/${uri.path}').path;
+ if (_entrypoint.scheme == 'http') {
+ path = _entrypoint.resolve('packages/${uri.path}').toString();
+ } else {
+ path = _entrypoint.resolve('packages/${uri.path}').path;
+ }
}
_logResolution("# Package: $path");
« no previous file with comments | « no previous file | runtime/bin/dartutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698