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

Unified Diff: frog/leg/frog_leg.dart

Issue 9535012: Introduce the legium component in test.dart, and start support for dart:dom and dart:html. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « frog/leg/compiler.dart ('k') | frog/leg/native_handler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/frog_leg.dart
===================================================================
--- frog/leg/frog_leg.dart (revision 4786)
+++ frog/leg/frog_leg.dart (working copy)
@@ -84,7 +84,21 @@
cancel(message.toString(), node);
}
+ Uri getUriFor(String fileName) {
+ Uri cwd = new Uri(scheme: 'file', path: currentDirectory);
+ return cwd.resolve(fileName);
+ }
+
Script readScript(Uri uri, [ScriptTag node]) {
+ String uriName = uri.toString();
+ // TODO(ahe): Clean this up.
+ if (uriName == 'dart:dom') {
+ uri = getUriFor(io.join([legDirectory, '..', '..',
+ 'client', 'dom', 'frog', 'dom_frog.dart']));
+ } else if (uriName == 'dart:html') {
+ uri = getUriFor(io.join([legDirectory, '..', '..',
+ 'client', 'html', 'frog', 'html_frog.dart']));
+ }
if (uri.scheme != 'file') cancel('cannot read $uri', node: node);
String text = "";
try {
« no previous file with comments | « frog/leg/compiler.dart ('k') | frog/leg/native_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698