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

Unified Diff: tools/testing/dart/test_suite.dart

Issue 148913003: Improve how we handle packages/ HTML imports. This resolves better any valid (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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/dart/test_controller.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 1df99ad1f4f660ac5557cad2f632e6ef0381ef30..1c69d0e552bba231ca29a5a8967ddf4ec6c6b730 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -1121,7 +1121,20 @@ class StandardTestSuite extends TestSuite {
commands.add(_polymerDeployCommand(
customHtmlPath, tempDir, optionsFromFile));
- htmlPath = '$tempDir/test/$nameNoExt.html';
+ // Find package's home dir, where pubspec.yaml is located. The
+ // relative directory within the package will be part of the
+ // entrypoint path.
+ var homeDir = filePath;
+ var pubspec = '';
+ do {
+ homeDir = homeDir.directoryPath;
+ if (homeDir.toString() == '/') {
+ homeDir = dir;
+ break;
+ }
+ pubspec = homeDir.append('pubspec.yaml').toNativePath();
+ } while (!new File(pubspec).existsSync());
kustermann 2014/01/29 20:48:40 There is already logic to do something similar. Pl
Siggi Cherem (dart-lang) 2014/01/29 22:15:07 Thanks. All set.
+ htmlPath = '$tempDir/${dir.relativeTo(homeDir)}/$nameNoExt.html';
kustermann 2014/01/29 20:48:40 I don't understand what the purpose of this is. Th
Siggi Cherem (dart-lang) 2014/01/29 22:15:07 Yes and no - it always supported putting the outpu
dartWrapperFilename = '${htmlPath}_bootstrap.dart';
compiledDartWrapperFilename = '$dartWrapperFilename.js';
} else {
« no previous file with comments | « tools/testing/dart/test_controller.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698