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

Unified Diff: tools/testing/frogpad/frogpad.py

Issue 9677020: fix directory ambiguity problem in frogpad (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | « tools/testing/frogpad/frogpad.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/frogpad/frogpad.py
diff --git a/tools/testing/frogpad/frogpad.py b/tools/testing/frogpad/frogpad.py
index 11e315fe0d353905b79f167465e699ded90c83d2..e683a155b54581374e423c8141e7b56011357e3a 100755
--- a/tools/testing/frogpad/frogpad.py
+++ b/tools/testing/frogpad/frogpad.py
@@ -119,6 +119,9 @@ DIRECTIVE_RE = re.compile(r"^#(import|source|native)\([\"']([^\"']*)[\"']")
# (This file name passed will be passed to the frog compiler by frogpad.dart.)
MAIN_ID = "main_id"
+# id of the script tag that holds the name of the frog directory
+FROGDIR_ID = "frogdir_id"
+
DART_LIBRARIES = {
"core": "lib/corelib.dart",
"coreimpl": "lib/corelib_impl.dart",
@@ -223,6 +226,7 @@ class Pad(object):
for f in self.id_to_file.values():
tags.append(self._create_tag(f.id, f.contents))
tags.append(self._create_tag(MAIN_ID, self.main_file))
+ tags.append(self._create_tag(FROGDIR_ID, self.frog_dir))
html = HTML.replace("{{script_tags}}", "".join(tags))
html = html.replace("{{FROGPAD_JS}}", read_file(self.frogpad_js))
return html
@@ -288,10 +292,7 @@ class File(object):
Generates an id (based on the file name) for the <script> tag that will
hold the contents of this file.
"""
- (dirname, name) = os.path.split(self.name)
- dirname = os.path.basename(dirname)
- name = name.replace(".", "_")
- return dirname + "_" + name
+ return self.name.replace("/", "_").replace(".", "_")
def directives(self):
"""Load files referenced by #source, #import and #native directives."""
« no previous file with comments | « tools/testing/frogpad/frogpad.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698