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

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

Issue 13962004: adjust location of URI helper files for spawn_uri tests in the browser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « tests/isolate/spawn_uri_nested_vm_test.dart ('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 6381a12bb2d8e253e0b8085b3d622f889204636b..c56b45ccf0b19375573fa04c69e101315f329df0 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -920,19 +920,6 @@ class StandardTestSuite extends TestSuite {
_createWrapperFile(dartWrapperFilename, filePath);
} else {
dartWrapperFilename = filename;
- // TODO(whesse): Once test.py is retired, adjust the relative path in
- // the client/samples/dartcombat test to its css file, remove the
- // "../../" from this path, and move this out of the isWebTest guard.
- // Also remove getHtmlName, and just use test.html.
- // TODO(efortuna): this shortening of htmlFilename is a band-aid until
- // the above TODO gets fixed. Windows cannot have paths that are longer
- // than 260 characters, and without this hack, we were running past the
- // the limit.
- String htmlFilename = getHtmlName(filename);
- while ('$tempDir/../$htmlFilename'.length >= 260) {
- htmlFilename = htmlFilename.substring(htmlFilename.length~/2);
- }
- htmlPath = '$tempDir/../$htmlFilename';
}
String scriptPath = (compiler == 'none') ?
dartWrapperFilename : compiledDartWrapperFilename;
@@ -966,18 +953,27 @@ class StandardTestSuite extends TestSuite {
commands.add(_compileCommand(
dartWrapperFilename, compiledDartWrapperFilename,
compiler, tempDir, vmOptions, optionsFromFile));
+ }
- // some tests require compiling multiple input scripts.
- List<String> otherScripts = optionsFromFile['otherScripts'];
- for (String name in otherScripts) {
- Path namePath = new Path(name);
+ // some tests require compiling multiple input scripts.
+ List<String> otherScripts = optionsFromFile['otherScripts'];
+ for (String name in otherScripts) {
+ Path namePath = new Path(name);
+ String baseName = namePath.filenameWithoutExtension;
+ Path fromPath = filePath.directoryPath.join(namePath);
+ if (compiler != 'none') {
assert(namePath.extension == 'dart');
- String baseName = namePath.filenameWithoutExtension;
- Path fromPath = filePath.directoryPath.join(namePath);
commands.add(_compileCommand(
fromPath.toNativePath(), '$tempDir/$baseName.js',
compiler, tempDir, vmOptions, optionsFromFile));
}
+ if (compiler == 'none') {
+ // For the tests that require multiple input scripts but are not
+ // compiled, move the input scripts over with the script so they can
+ // be accessed.
+ String result = new File.fromPath(fromPath).readAsStringSync();
+ new File('$tempDir/$baseName.dart').writeAsStringSync(result);
+ }
}
// Variables for browser multi-tests.
@@ -1173,15 +1169,6 @@ class StandardTestSuite extends TestSuite {
}
}
- String getHtmlName(String filename) {
- var cleanFilename = filename.replaceAll('/', '_')
- .replaceAll(':', '_')
- .replaceAll('\\', '_');
-
- return "$cleanFilename"
- "${configuration['compiler']}-${configuration['runtime']}.html";
- }
-
String get dumpRenderTreeFilename {
if (configuration['drt'] != '') {
return configuration['drt'];
« no previous file with comments | « tests/isolate/spawn_uri_nested_vm_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698