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

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

Issue 23726054: Address comments from CL 23721012. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/test_suite.dart
diff --git a/dart/tools/testing/dart/test_suite.dart b/dart/tools/testing/dart/test_suite.dart
index 474f28c27a5b29707b7ea0a150b8f38e5b6c4323..2371140c5b51f52e01270ad5f390506054c72b09 100644
--- a/dart/tools/testing/dart/test_suite.dart
+++ b/dart/tools/testing/dart/test_suite.dart
@@ -968,6 +968,7 @@ class StandardTestSuite extends TestSuite {
String dartWrapperFilename = '$tempDir/test.dart';
String compiledDartWrapperFilename = '$tempDir/test.js';
+ String precompiledDartWrapperFilename = '$tempDir/test.precompiled.js';
String content = null;
Path dir = filePath.directoryPath;
@@ -1015,8 +1016,13 @@ class StandardTestSuite extends TestSuite {
RandomAccessFile htmlTest =
new File(htmlPath).openSync(mode: FileMode.WRITE);
- String scriptPath = (compiler == 'none') ?
- dartWrapperFilename : compiledDartWrapperFilename;
+ String scriptPath = dartWrapperFilename;
+ if (compiler != 'none') {
+ scriptPath = compiledDartWrapperFilename;
+ if (configuration['csp']) {
+ scriptPath = precompiledDartWrapperFilename;
+ }
+ }
scriptPath = _createUrlPathFromFile(new Path(scriptPath));
if (new File(pngPath.toNativePath()).existsSync()) {
@@ -1026,11 +1032,6 @@ class StandardTestSuite extends TestSuite {
expectedOutput = txtPath;
content = getHtmlLayoutContents(scriptType, new Path("$scriptPath"));
} else {
- if (compiler == "dart2js" && configuration["csp"]) {
- scriptPath =
- scriptPath.replaceFirst('/test.js', '/test.precompiled.js');
- }
-
content = getHtmlContents(filename, scriptType,
new Path("$scriptPath"));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698