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

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, 7 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') | tests/standalone/http_launch_test.dart » ('J')
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 73736c682f6941b86092847351321e7532f2ce92..f612cfa64c93fc798268f5f61def5bda484df07c 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -72,6 +72,12 @@ _setPackageRoot(String packageRoot) {
}
String _resolveScriptUri(String cwd, String scriptName, bool isWindows) {
+ var scriptUri = Uri.parse(scriptName);
+ if (scriptUri.scheme == 'http') {
Søren Gjesse 2013/06/03 07:12:07 How about https?
Ivan Posva 2013/06/03 07:22:56 What if the URI we were handed on the command line
Cutch 2013/06/03 17:55:37 Now that we are using the dart:io HttpClient we ca
Cutch 2013/06/03 17:55:37 Agreed. This code needs to be cleaned up. I'll do
+ _entrypoint = scriptUri;
+ _logResolution("# Resolved script to: $_entrypoint");
+ return _entrypoint.toString();
+ }
_logResolution("# Current working directory: $cwd");
_logResolution("# ScriptName: $scriptName");
if (isWindows) {
@@ -195,7 +201,11 @@ String _filePathFromPackageUri(Uri uri) {
if (_packageRoot != null) {
path = "${_packageRoot}${uri.path}";
Ivan Posva 2013/06/03 07:22:56 What is confusing in this whole scheme is that if
Cutch 2013/06/03 17:55:37 See my other comment. This function needs to be cl
} else {
- path = _entrypoint.resolve('packages/${uri.path}').path;
+ if (_entrypoint.scheme == 'http') {
Søren Gjesse 2013/06/03 07:12:07 Ditto.
+ 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') | tests/standalone/http_launch_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698