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

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 | « no previous file | frog/leg/native_handler.dart » ('j') | frog/leg/scanner/scanner_task.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/frog_leg.dart
===================================================================
--- frog/leg/frog_leg.dart (revision 4753)
+++ frog/leg/frog_leg.dart (working copy)
@@ -84,7 +84,20 @@
cancel(message.toString(), node);
}
+ Uri getUriOf(String fileName) {
kasperl 2012/03/01 06:30:15 I would call this getUriFor because the file name
ngeoffray 2012/03/01 08:57:57 Done.
+ Uri cwd = new Uri(scheme: 'file', path: currentDirectory);
+ return cwd.resolve(fileName);
+ }
+
Script readScript(Uri uri, [ScriptTag node]) {
+ String uriName = uri.toString();
+ if (uriName == 'dart:dom') {
ahe 2012/02/29 17:35:27 Please add: // TODO(ahe): Clean this up.
ngeoffray 2012/03/01 08:57:57 Done.
+ uri = getUriOf(io.join([legDirectory, '..', '..',
+ 'client', 'dom', 'frog', 'dom_frog.dart']));
+ } else if (uriName == 'dart:html') {
+ uri = getUriOf(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 | « no previous file | frog/leg/native_handler.dart » ('j') | frog/leg/scanner/scanner_task.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698